com.atomikos.util
Class LRUPool

java.lang.Object
  extended by com.atomikos.util.BaseObjectPool
      extended by 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


Field Summary
 
Fields inherited from class com.atomikos.util.BaseObjectPool
maxSize_, pool_, size_
 
Constructor Summary
LRUPool(long maxSize)
           
 
Method Summary
protected  Object getVictim()
          Get a victim for removal if pool is full.
protected  PooledObject wrap(Identifiable object)
          Wrap an instance into a pool handle object.
 
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
 

Constructor Detail

LRUPool

public LRUPool(long maxSize)
Method Detail

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.