com.atomikos.util
Class LRUPool
java.lang.Object
com.atomikos.util.BaseObjectPool
com.atomikos.util.LRUPool
- All Implemented Interfaces:
- ObjectPool
public class LRUPool
- extends BaseObjectPool
Copyright © 2001, Atomikos. All rights reserved.
An implementation of a pool with LRU replacement
Constructor Summary |
LRUPool(long maxSize)
|
Methods inherited from class com.atomikos.util.BaseObjectPool |
add, elements, getMaxSize, getSize, internalElements, isEmpty, isFull, remove, remove, retrieve, retrieve |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LRUPool
public LRUPool(long maxSize)
getVictim
protected Object getVictim()
- Description copied from class:
BaseObjectPool
- Get a victim for removal if pool is full.
- Specified by:
getVictim
in class BaseObjectPool
- Returns:
- Object The id of the victim.
wrap
protected PooledObject wrap(Identifiable object)
- Description copied from class:
BaseObjectPool
- Wrap an instance into a pool handle object.
- Specified by:
wrap
in class BaseObjectPool
- Parameters:
object
- The instance.
- Returns:
- PooledObject The pool handle.