Class DBLockBasedCacheInitializer


public class DBLockBasedCacheInitializer extends CacheInitializer
Encapsulates preloading of sessions within the DB Lock. This DB-aware lock ensures that "startLoading" is done on single DC and the other DCs need to wait.
Marek Posolda
  • Constructor Details

  • Method Details

    • initCache

      public void initCache()
      initCache in class CacheInitializer
    • isFinished

      protected boolean isFinished()
      Specified by:
      isFinished in class CacheInitializer
    • isCoordinator

      protected boolean isCoordinator()
      Specified by:
      isCoordinator in class CacheInitializer
    • getProgressIndicator

      protected int getProgressIndicator()
      Description copied from class: CacheInitializer
      Returns an integer which captures current progress. If there is a progress in loading, this indicator must be different most of the time so that it does not hit 30-seconds limit.
      Specified by:
      getProgressIndicator in class CacheInitializer
      See Also:
      • #stalledTimeoutInSeconds
    • getStalledTimeoutInSeconds

      protected int getStalledTimeoutInSeconds()
      Specified by:
      getStalledTimeoutInSeconds in class CacheInitializer
    • startLoading

      protected void startLoading()
      Just coordinator will run this. And there is DB-lock, so the delegate.startLoading() will be permitted just by the single DC
      Specified by:
      startLoading in class CacheInitializer