Class DefaultProcessStateService
java.lang.Object
com.broadleafcommerce.search.index.core.AbstractProcessStateService
com.broadleafcommerce.search.index.core.DefaultProcessStateService
- All Implemented Interfaces:
- Distributable,- EventPublisher,- ProcessStateService,- org.springframework.beans.factory.Aware,- org.springframework.context.ApplicationContextAware
public class DefaultProcessStateService
extends AbstractProcessStateService
implements org.springframework.context.ApplicationContextAware
Default implementation of the ProcessStateService interface. This component is for use within a
 single JVM and assumes that the Spring ApplicationContext is configured to raise synchronous,
 in-VM events.
- Author:
- Kelly Tisdell (ktisdell)
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal intgetClusterMemberCount(com.broadleafcommerce.search.api.type.IndexableType type) Returns the number of cluster members that may be working together to process data.final booleanIndicates if this component is designed for use across JVMs.voidLightweight interface to publish an event.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) Methods inherited from class com.broadleafcommerce.search.index.core.AbstractProcessStateServiceendProcessState, failFast, failFast, failFast, getCorrelationId, getCurrentProcessStateHolder, getInstance, isFailed, isMaster, isProcessStateEnabled, startProcessState
- 
Constructor Details- 
DefaultProcessStateServicepublic DefaultProcessStateService()
 
- 
- 
Method Details- 
publishEventDescription copied from interface:EventPublisherLightweight interface to publish an event. This component will delegate directly to Spring if it's not distributable. Otherwise, it will publish to whatever distributed event system is available (e.g. Kafka, JMS, RabbitMQ, Ignite Events, etc.) In the case of distributed events, the system should delegate to Spring on arrival of the event.- Specified by:
- publishEventin interface- EventPublisher
- Parameters:
- event- the event to publish
 
- 
isDistributedpublic final boolean isDistributed()Description copied from interface:DistributableIndicates if this component is designed for use across JVMs.- Specified by:
- isDistributedin interface- Distributable
- Returns:
- whether this component can be distributed across JVMs
 
- 
getClusterMemberCountpublic final int getClusterMemberCount(com.broadleafcommerce.search.api.type.IndexableType type) Description copied from interface:ProcessStateServiceReturns the number of cluster members that may be working together to process data. IfDistributable.isDistributed()is false, then this should ALWAYS return 1.- Specified by:
- getClusterMemberCountin interface- ProcessStateService
- Parameters:
- type- the indexable type for which to get the cluster member count
- Returns:
- the number of cluster members that may be working together to process data
 
- 
setApplicationContextpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
- setApplicationContextin interface- org.springframework.context.ApplicationContextAware
 
 
-