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 theProcessStateService
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
Constructors Constructor Description IgniteProcessStateService(org.apache.ignite.Ignite ignite, String roleKey, String roleName, String topicName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
void
destroy()
protected org.springframework.context.ApplicationContext
getApplicationContext()
int
getClusterMemberCount(com.broadleafcommerce.search.api.type.IndexableType indexableType)
protected org.apache.ignite.Ignite
getIgnite()
protected org.apache.ignite.IgniteMessaging
getMessageBus()
protected org.apache.ignite.IgniteMessaging
getReindexMessageBus()
protected String
getRoleKey()
protected String
getRoleName()
protected String
getTopicName()
boolean
isDistributed()
void
publishEvent(com.broadleafcommerce.search.index.core.event.SearchIndexProcessEvent event)
void
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
-
-
Method Detail
-
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
protected String getRoleKey()
-
getRoleName
protected String getRoleName()
-
getTopicName
protected String getTopicName()
-
getIgnite
protected org.apache.ignite.Ignite getIgnite()
-
getReindexMessageBus
protected org.apache.ignite.IgniteMessaging getReindexMessageBus()
-
-