Class IgniteProcessStateService
java.lang.Object
com.broadleafcommerce.search.index.core.AbstractProcessStateService
com.broadleafcommerce.search.index.ignite.IgniteProcessStateService
- All Implemented Interfaces:
com.broadleafcommerce.search.index.core.Distributable,com.broadleafcommerce.search.index.core.EventPublisher,com.broadleafcommerce.search.index.core.ProcessStateService,org.springframework.beans.factory.Aware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware
public class IgniteProcessStateService
extends com.broadleafcommerce.search.index.core.AbstractProcessStateService
implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Implementation of the
ProcessStateService that is backed by Apache Ignite. In particular,
this is distributed and uses Ignite for remote event publishing.
Note this has to be Serializable due to the way the IgniteMessaging message bus handles
events. But the properties should be OK to be transient.
- Author:
- Kelly Tisdell (ktisdell)
-
Constructor Summary
ConstructorsConstructorDescriptionIgniteProcessStateService(org.apache.ignite.Ignite ignite, String roleKey, String roleName, String topicName) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddestroy()protected final org.springframework.context.ApplicationContextintgetClusterMemberCount(com.broadleafcommerce.search.api.type.IndexableType indexableType) protected org.apache.ignite.Igniteprotected final org.apache.ignite.IgniteMessagingprotected org.apache.ignite.IgniteMessagingprotected Stringprotected Stringprotected Stringfinal booleanvoidpublishEvent(com.broadleafcommerce.search.index.core.event.SearchIndexProcessEvent event) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) Methods inherited from class com.broadleafcommerce.search.index.core.AbstractProcessStateService
endProcessState, failFast, failFast, failFast, getCorrelationId, getCurrentProcessStateHolder, getInstance, isFailed, isMaster, isProcessStateEnabled, startProcessState
-
Constructor Details
-
IgniteProcessStateService
-
-
Method Details
-
getClusterMemberCount
public int getClusterMemberCount(com.broadleafcommerce.search.api.type.IndexableType indexableType) - Specified by:
getClusterMemberCountin interfacecom.broadleafcommerce.search.index.core.ProcessStateService
-
publishEvent
public void publishEvent(com.broadleafcommerce.search.index.core.event.SearchIndexProcessEvent event) - Specified by:
publishEventin interfacecom.broadleafcommerce.search.index.core.EventPublisher
-
isDistributed
public final boolean isDistributed()- Specified by:
isDistributedin interfacecom.broadleafcommerce.search.index.core.Distributable
-
getMessageBus
protected final org.apache.ignite.IgniteMessaging getMessageBus() -
getApplicationContext
protected final org.springframework.context.ApplicationContext getApplicationContext() -
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-
getRoleKey
-
getRoleName
-
getTopicName
-
getIgnite
protected org.apache.ignite.Ignite getIgnite() -
getReindexMessageBus
protected org.apache.ignite.IgniteMessaging getReindexMessageBus()
-