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 Details

    • IgniteProcessStateService

      public IgniteProcessStateService(org.apache.ignite.Ignite ignite, String roleKey, String roleName, String topicName)
  • Method Details

    • getClusterMemberCount

      public int getClusterMemberCount(com.broadleafcommerce.search.api.type.IndexableType indexableType)
      Specified by:
      getClusterMemberCount in interface com.broadleafcommerce.search.index.core.ProcessStateService
    • publishEvent

      public void publishEvent(com.broadleafcommerce.search.index.core.event.SearchIndexProcessEvent event)
      Specified by:
      publishEvent in interface com.broadleafcommerce.search.index.core.EventPublisher
    • isDistributed

      public final boolean isDistributed()
      Specified by:
      isDistributed in interface com.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 interface org.springframework.context.ApplicationContextAware
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.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()