Class ActivationManagerImpl

java.lang.Object
org.infinispan.eviction.impl.ActivationManagerImpl
All Implemented Interfaces:
ActivationManager, PersistenceManager.StoreChangeListener

@MBean(objectName="Activation", description="Component that handles activating entries that have been passivated to a CacheStore by loading them into memory.") public class ActivationManagerImpl extends Object implements ActivationManager, PersistenceManager.StoreChangeListener
Concrete implementation of activation logic manager.
Since:
5.2
Author:
Galder ZamarreƱo
  • Constructor Details

    • ActivationManagerImpl

      public ActivationManagerImpl()
  • Method Details

    • start

      public void start()
    • stop

      public void stop()
    • storeChanged

      public void storeChanged(PersistenceStatus persistenceStatus)
      Description copied from interface: PersistenceManager.StoreChangeListener
      Notifies when a store was added or removed dynamically. This method is always invoked with mutual access to any other method in PersistenceManager. Implementations must only ensure visibility or atomicity of their own variables and operations.
      Specified by:
      storeChanged in interface PersistenceManager.StoreChangeListener
    • activateAsync

      public CompletionStage<Void> activateAsync(Object key, int segment)
      Description copied from interface: ActivationManager
      Activates an entry, effectively removing it from the underlying persistence store. Note that the removal may be done asynchronously and when the returned Stage is complete the removal is also completed.
      Specified by:
      activateAsync in interface ActivationManager
      Parameters:
      key - key to activate
      segment - segment the key maps to
      Returns:
      stage that when complete the entry has been activated
    • getActivationCount

      public long getActivationCount()
      Description copied from interface: ActivationManager
      Get number of activations executed.
      Specified by:
      getActivationCount in interface ActivationManager
      Returns:
      A long representing the number of activations
    • getActivations

      @ManagedAttribute(description="Number of activation events", displayName="Number of cache entries activated", measurementType=TRENDSUP) public String getActivations()
    • resetStatistics

      @ManagedOperation(description="Resets statistics gathered by this component", displayName="Reset statistics") public void resetStatistics()
    • getStatisticsEnabled

      @ManagedAttribute(description="Enables or disables the gathering of statistics by this component", displayName="Statistics enabled", writable=true) public boolean getStatisticsEnabled()
    • setStatisticsEnabled

      public void setStatisticsEnabled(boolean statisticsEnabled)
    • getPendingActivationCount

      public long getPendingActivationCount()
      Specified by:
      getPendingActivationCount in interface ActivationManager