org.ow2.util.pool.impl.enhanced.impl.basic.accessmanager
Class LastUsedAccessManager<E>
java.lang.Object
org.ow2.util.pool.impl.enhanced.impl.basic.accessmanager.LastUsedAccessManager<E>
- Type Parameters:
E - pool item type
- All Implemented Interfaces:
- IAccessManager<E>
- Direct Known Subclasses:
- LastUsedClueAccessManager
public class LastUsedAccessManager<E>
- extends java.lang.Object
- implements IAccessManager<E>
- Author:
- Gael Lalire
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LastUsedAccessManager
public LastUsedAccessManager()
choosePoolItemToGet
public int choosePoolItemToGet(java.util.List<? extends E> poolItemList)
- Specified by:
choosePoolItemToGet in interface IAccessManager<E>
- Parameters:
poolItemList - the list of pool item
- Returns:
- a value between 0 and poolItemList.size()-1 or
DELAY_GET.
putPoolItem
public int putPoolItem(java.util.List<? extends E> poolItemList,
E poolItem)
- Specified by:
putPoolItem in interface IAccessManager<E>
- Parameters:
poolItemList - the list of pool itempoolItem - poolItem to put in list
- Returns:
- a value between 0 and poolItemList.size()
choosePoolItemToRelease
public int choosePoolItemToRelease(java.util.List<? extends E> poolItemList)
- Specified by:
choosePoolItemToRelease in interface IAccessManager<E>
- Parameters:
poolItemList - the list of pool item
- Returns:
- a value between 0 and poolItemList.size()-1
createPoolItem
public int createPoolItem(java.util.List<? extends E> poolItemList,
E poolItem)
- Specified by:
createPoolItem in interface IAccessManager<E>
- Parameters:
poolItemList - the list of pool itempoolItem - poolItem to put in list
- Returns:
- a value between 0 and poolItemList.size()
removePoolItem
public void removePoolItem(E poolItem)
- Description copied from interface:
IAccessManager
- This callback is useful to clean up data you keep by poolItem.
- Specified by:
removePoolItem in interface IAccessManager<E>
- Parameters:
poolItem - poolItem
Copyright © 2007-2009 OW2 Consortium. All Rights Reserved.