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 TypeMethodDescriptionvoid
void
destroy()
protected final org.springframework.context.ApplicationContext
int
getClusterMemberCount
(com.broadleafcommerce.search.api.type.IndexableType indexableType) protected org.apache.ignite.Ignite
protected final org.apache.ignite.IgniteMessaging
protected org.apache.ignite.IgniteMessaging
protected String
protected String
protected String
final boolean
void
publishEvent
(com.broadleafcommerce.search.index.core.event.SearchIndexProcessEvent event) void
setApplicationContext
(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:
getClusterMemberCount
in interfacecom.broadleafcommerce.search.index.core.ProcessStateService
-
publishEvent
public void publishEvent(com.broadleafcommerce.search.index.core.event.SearchIndexProcessEvent event) - Specified by:
publishEvent
in interfacecom.broadleafcommerce.search.index.core.EventPublisher
-
isDistributed
public final boolean isDistributed()- Specified by:
isDistributed
in 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:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
destroy
public void destroy()- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
-
getRoleKey
-
getRoleName
-
getTopicName
-
getIgnite
protected org.apache.ignite.Ignite getIgnite() -
getReindexMessageBus
protected org.apache.ignite.IgniteMessaging getReindexMessageBus()
-