Package me.hsgamer.topper.agent.runnable
Class RunnableAgent<K,V,A extends Agent<K,V> & Runnable>
- java.lang.Object
-
- me.hsgamer.topper.agent.runnable.RunnableAgent<K,V,A>
-
-
Constructor Summary
Constructors Constructor Description RunnableAgent(A agent)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidbeforeStop()AgetAgent()voidonCreate(DataEntry<K,V> entry)voidonRemove(DataEntry<K,V> entry)voidonUnregister(DataEntry<K,V> entry)voidonUpdate(DataEntry<K,V> entry)protected abstract Runnablerun(Runnable runnable)This method is used to run the task and return aRunnableto cancel itvoidstart()voidstop()
-
-
-
Constructor Detail
-
RunnableAgent
public RunnableAgent(A agent)
-
-
Method Detail
-
run
protected abstract Runnable run(Runnable runnable)
This method is used to run the task and return aRunnableto cancel it- Parameters:
runnable- the task to run- Returns:
- the
Runnableto cancel the task
-
beforeStop
public void beforeStop()
- Specified by:
beforeStopin interfaceAgent<K,V>
-
onUnregister
public void onUnregister(DataEntry<K,V> entry)
- Specified by:
onUnregisterin interfaceAgent<K,V>
-
getAgent
public A getAgent()
-
-