public class TimedResourceMap.Terminator
extends java.lang.Object
implements java.lang.Runnable
TimedResourceMap and removes members (@link SelfTerminatingValue) that have reached their life expectancy| Constructor and Description |
|---|
Terminator(boolean startWorkerThread) |
| Modifier and Type | Method and Description |
|---|---|
int |
getLifespan() |
int |
getTerminatorInterval()
Get the interval in which an object will live in the map before
it is removed.
|
boolean |
isThreadRunning() |
void |
run() |
void |
setLifespan(long lifespan) |
void |
setTerminationInterval(long terminationInterval) |
void |
startWorkerThread()
Start this worker thread.
|
void |
stopTerminating()
Stop this worker thread.
|
public void run()
run in interface java.lang.Runnablepublic boolean isThreadRunning()
public void stopTerminating()
public void startWorkerThread()
public void setTerminationInterval(long terminationInterval)
public int getTerminatorInterval()
public void setLifespan(long lifespan)
public int getLifespan()