| IBM WebSphere Extended Deployment (XD)TM
Release 6.0.1 |
java.lang.Object
|
+--com.ibm.websphere.objectgrid.plugins.builtins.LRUEvictor
Field Summary | |
---|---|
public long | DEFAULT_SLEEP_TIME
Default sleep time for evictor thread if the
#setSleepTime(int) method is not called.
|
public int | DEFAULT_NUMBER_OF_QUEUES
Default number of LRU queues to create if the
#setNumberOfLRUQueues(int) method is not called.
|
Constructor Summary | |
---|---|
LRUEvictor()
Construct a LRUEvictor object with default values for the maximum size per LRU queue, the number of queues, and sleep time between sweeps by the evictor thread. |
Method Summary | |
---|---|
public
void | initialize(com.ibm.websphere.objectgrid.BackingMap, com.ibm.websphere.objectgrid.plugins.EvictionEventCallback)
|
public
void | apply(com.ibm.websphere.objectgrid.plugins.LogSequence)
This maintains a bi-directional queue ordered on last accessed.
|
public
void | rollingBack(com.ibm.websphere.objectgrid.plugins.LogSequence)
|
public
int | getMaxSize()
Get maximum size of each LRU queue.
|
public
void | setMaxSize(int)
Used to override the default maximum size for each LRU queue used to keep
LRU data.
|
public
int | getSleepTime()
Get sleep time being used in seconds.
|
public
void | setSleepTime(int)
Used to override the default sleep time of evictor thread in seconds. .
|
public
int | getNumberOfLRUQueues()
Get number of LRU queues being used.
|
public
void | setNumberOfLRUQueues(int)
Used to override the default number of LRU queues created by the
initiaze method.
|
public
void | run()
The evictor must manage it's size here and send eviction events to the Map..
|
public
void | destroy()
|
Methods inherited from java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static DEFAULT_SLEEP_TIME
public static DEFAULT_NUMBER_OF_QUEUES
Constructor Detail |
public LRUEvictor( | ) |
Method Detail |
public void initialize( | BackingMap map , | EvictionEventCallback callback )
|
initialize(com.ibm.websphere.objectgrid.BackingMap, com.ibm.websphere.objectgrid.plugins.EvictionEventCallback)
public void apply( | LogSequence sequence )
|
apply(com.ibm.websphere.objectgrid.plugins.LogSequence)
public void rollingBack( | LogSequence sequence )
|
public int getMaxSize( | ) |
public void setMaxSize( | int maxSize )
|
maxSize
-
is the maximum size per LRU queue. Any value <= 0 indicates to
allow queue to be of unlimited size. In which case, no LRU data is kept.
If this method is not called, no LRU data is kept and size is unlimited.
java.lang.IllegalStateException
public int getSleepTime( | ) |
public void setSleepTime( | int seconds )
|
seconds
-
is the number of seconds evictor thread sleeps in between
each sweep of the LRU queue.
java.lang.IllegalArgumentExceptionjava.lang.IllegalStateException
public int getNumberOfLRUQueues( | ) |
public void setNumberOfLRUQueues( | int numberOfQueues )
|
numberOfQueues
-
is the number of LinkedList instances
used to LRU data.
java.lang.IllegalArgumentExceptionjava.lang.IllegalStateException
public void run( | ) |
public void destroy( | ) |
destroy()
| IBM WebSphere Extended Deployment (XD)TM
Release 6.0.1 |