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.DisposableBeanImplementation of theProcessStateServicethat 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
IgniteMessagingmessage 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 voidafterPropertiesSet()voiddestroy()protected org.springframework.context.ApplicationContextgetApplicationContext()intgetClusterMemberCount(com.broadleafcommerce.search.api.type.IndexableType indexableType)protected org.apache.ignite.IgnitegetIgnite()protected org.apache.ignite.IgniteMessaginggetMessageBus()protected org.apache.ignite.IgniteMessaginggetReindexMessageBus()protected StringgetRoleKey()protected StringgetRoleName()protected StringgetTopicName()booleanisDistributed()voidpublishEvent(com.broadleafcommerce.search.index.core.event.SearchIndexProcessEvent event)voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
-
-
Method Detail
-
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
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()
-
-