public class ExpiringMap.Expirer extends Object implements Runnable
ExpiringMap
and will remove
elements that have passed the threshold.Constructor and Description |
---|
ExpiringMap.Expirer()
Creates a new instance of Expirer.
|
Modifier and Type | Method and Description |
---|---|
int |
getExpirationInterval()
Get the interval in which an object will live in the map before
it is removed.
|
int |
getTimeToLive() |
boolean |
isRunning()
Checks to see if the thread is running
|
void |
run() |
void |
setExpirationInterval(long expirationInterval)
Set the interval in which an object will live in the map before
it is removed.
|
void |
setTimeToLive(long timeToLive)
Update the value for the time-to-live
|
void |
startExpiring()
Kick off this thread which will look for old objects and remove them.
|
void |
startExpiringIfNotStarted()
If this thread has not started, then start it.
|
void |
stopExpiring()
Stop the thread from monitoring the map.
|
public ExpiringMap.Expirer()
public void startExpiring()
public void startExpiringIfNotStarted()
public void stopExpiring()
public boolean isRunning()
public int getTimeToLive()
public void setTimeToLive(long timeToLive)
timeToLive
- The time-to-live (seconds)public int getExpirationInterval()
public void setExpirationInterval(long expirationInterval)
expirationInterval
- The time in secondsCopyright © 2004–2016 Apache MINA Project. All rights reserved.