Package me.hsgamer.topper.agent.storage
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 Summary
Constructors Constructor Description StorageAgent(Logger logger, DataHolder<K,V> holder, DataStorage<K,V> storage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeforeStop()DataStorage<K,V>getStorage()voidonRemove(DataEntry<K,V> entry)voidonUpdate(DataEntry<K,V> entry, V oldValue)voidrun()voidsetMaxEntryPerCall(int taskSaveEntryPerTick)voidstart()voidstop()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface me.hsgamer.topper.agent.core.DataEntryAgent
onCreate, onUnregister
-
-
-
-
Constructor Detail
-
StorageAgent
public StorageAgent(Logger logger, DataHolder<K,V> holder, DataStorage<K,V> storage)
-
-
Method Detail
-
beforeStop
public void beforeStop()
- Specified by:
beforeStopin interfaceAgent
-
onUpdate
public void onUpdate(DataEntry<K,V> entry, V oldValue)
- Specified by:
onUpdatein interfaceDataEntryAgent<K,V>
-
onRemove
public void onRemove(DataEntry<K,V> entry)
- Specified by:
onRemovein interfaceDataEntryAgent<K,V>
-
getStorage
public DataStorage<K,V> getStorage()
-
setMaxEntryPerCall
public void setMaxEntryPerCall(int taskSaveEntryPerTick)
-
-