Class StorageAgent<K,V>

java.lang.Object
me.hsgamer.topper.agent.storage.StorageAgent<K,V>
All Implemented Interfaces:
Runnable, Agent, DataEntryAgent<K,V>

public class StorageAgent<K,V> extends Object implements Agent, DataEntryAgent<K,V>, Runnable
  • Constructor Details

  • Method Details

    • scheduleValue

      protected void scheduleValue(K key, @Nullable V value)
    • start

      public void start()
      Specified by:
      start in interface Agent
    • stop

      public void stop()
      Specified by:
      stop in interface Agent
    • beforeStop

      public void beforeStop()
      Specified by:
      beforeStop in interface Agent
    • onCreate

      public void onCreate(DataEntry<K,V> entry)
      Specified by:
      onCreate in interface DataEntryAgent<K,V>
    • onUpdate

      public void onUpdate(DataEntry<K,V> entry, V oldValue, V newValue)
      Specified by:
      onUpdate in interface DataEntryAgent<K,V>
    • onRemove

      public void onRemove(DataEntry<K,V> entry)
      Specified by:
      onRemove in interface DataEntryAgent<K,V>
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • getStorage

      public DataStorage<K,V> getStorage()
    • setMaxEntryPerCall

      public void setMaxEntryPerCall(int taskSaveEntryPerTick)
    • setLazyLoad

      public void setLazyLoad(boolean lazyLoad)
    • setScheduleOnEntryRemove

      public void setScheduleOnEntryRemove(boolean scheduleOnEntryRemove)