Class IgniteLockService

java.lang.Object
com.broadleafcommerce.search.index.ignite.IgniteLockService
All Implemented Interfaces:
com.broadleafcommerce.search.index.core.Distributable, com.broadleafcommerce.search.index.core.LockService, org.springframework.beans.factory.DisposableBean

public class IgniteLockService extends Object implements com.broadleafcommerce.search.index.core.LockService, org.springframework.beans.factory.DisposableBean
Default implementation of a LockService that provides a distributed Lock mechanism based on functionality provided by Apache Ignite.
Author:
Kelly Tisdell (ktisdell)
  • Field Details

  • Constructor Details

    • IgniteLockService

      public IgniteLockService(org.apache.ignite.Ignite ignite, org.apache.ignite.configuration.CacheConfiguration<String,Object> cacheConfig)
  • Method Details

    • isDistributed

      public final boolean isDistributed()
      Specified by:
      isDistributed in interface com.broadleafcommerce.search.index.core.Distributable
    • isLocked

      public boolean isLocked(@NonNull String lockName)
      Specified by:
      isLocked in interface com.broadleafcommerce.search.index.core.LockService
    • obtainLockInstance

      public Lock obtainLockInstance(@NonNull String lockName)
      Specified by:
      obtainLockInstance in interface com.broadleafcommerce.search.index.core.LockService
    • destroy

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

      protected final org.apache.ignite.IgniteCache<String,Object> getCache()