org.ow2.util.pool.impl.enhanced.impl.basic.accessmanager.clue
Class LastUsedClueAccessManager<E,C>

java.lang.Object
  extended by org.ow2.util.pool.impl.enhanced.impl.basic.accessmanager.LastUsedAccessManager<E>
      extended by org.ow2.util.pool.impl.enhanced.impl.basic.accessmanager.clue.LastUsedClueAccessManager<E,C>
Type Parameters:
E - pool item type
C - clue type
All Implemented Interfaces:
IAccessManager<E>, IClueAccessManager<E,C>

public class LastUsedClueAccessManager<E,C>
extends LastUsedAccessManager<E>
implements IClueAccessManager<E,C>

Author:
Gael Lalire

Field Summary
 
Fields inherited from interface org.ow2.util.pool.impl.enhanced.api.basic.accessmanager.IAccessManager
DELAY_GET
 
Constructor Summary
LastUsedClueAccessManager(IClueManager<E,C> clueManager)
           
 
Method Summary
 int choosePoolItemToGet(java.util.List<? extends E> poolItemList, C clue)
           
 int putPoolItem(java.util.List<? extends E> poolItemList, E poolItem)
           
 void removePoolItem(E poolItem)
          This callback is useful to clean up data you keep by poolItem.
 
Methods inherited from class org.ow2.util.pool.impl.enhanced.impl.basic.accessmanager.LastUsedAccessManager
choosePoolItemToGet, choosePoolItemToRelease, createPoolItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ow2.util.pool.impl.enhanced.api.basic.accessmanager.IAccessManager
choosePoolItemToGet, choosePoolItemToRelease, createPoolItem
 

Constructor Detail

LastUsedClueAccessManager

public LastUsedClueAccessManager(IClueManager<E,C> clueManager)
Method Detail

choosePoolItemToGet

public int choosePoolItemToGet(java.util.List<? extends E> poolItemList,
                               C clue)
Specified by:
choosePoolItemToGet in interface IClueAccessManager<E,C>

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>
Overrides:
removePoolItem in class LastUsedAccessManager<E>
Parameters:
poolItem - poolItem

putPoolItem

public int putPoolItem(java.util.List<? extends E> poolItemList,
                       E poolItem)
Specified by:
putPoolItem in interface IAccessManager<E>
Overrides:
putPoolItem in class LastUsedAccessManager<E>
Parameters:
poolItemList - the list of pool item
poolItem - poolItem to put in list
Returns:
a value between 0 and poolItemList.size()


Copyright © 2007-2009 OW2 Consortium. All Rights Reserved.