Package com.landawn.abacus.pool
Class GenericKeyedObjectPool<K,E extends Poolable>
java.lang.Object
com.landawn.abacus.pool.AbstractPool
com.landawn.abacus.pool.GenericKeyedObjectPool<K,E>
- Type Parameters:
K
- the key typeE
-
- All Implemented Interfaces:
KeyedObjectPool<K,
,E> Pool
,Serializable
public class GenericKeyedObjectPool<K,E extends Poolable>
extends AbstractPool
implements KeyedObjectPool<K,E>
- Since:
- 0.8
- Author:
- Haiyang Li
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.landawn.abacus.pool.KeyedObjectPool
KeyedObjectPool.MemoryMeasure<K,
E> -
Method Summary
Methods inherited from class com.landawn.abacus.pool.AbstractPool
evictionCount, getCapacity, hitCount, isClosed, isEmpty, lock, missCount, putCount, unlock
Methods inherited from interface com.landawn.abacus.pool.Pool
evictionCount, getCapacity, hitCount, isClosed, isEmpty, lock, missCount, putCount, unlock
-
Method Details
-
put
- Specified by:
put
in interfaceKeyedObjectPool<K,
E extends Poolable> - Parameters:
key
-e
-- Returns:
- true, if successful
-
put
- Specified by:
put
in interfaceKeyedObjectPool<K,
E extends Poolable> - Parameters:
key
-e
-autoDestroyOnFailedToPut
-- Returns:
- true, if successful
-
get
- Specified by:
get
in interfaceKeyedObjectPool<K,
E extends Poolable> - Parameters:
key
-- Returns:
-
remove
- Specified by:
remove
in interfaceKeyedObjectPool<K,
E extends Poolable> - Parameters:
key
-- Returns:
-
peek
Description copied from interface:KeyedObjectPool
Get but don't update last access time.- Specified by:
peek
in interfaceKeyedObjectPool<K,
E extends Poolable> - Parameters:
key
-- Returns:
-
containsKey
- Specified by:
containsKey
in interfaceKeyedObjectPool<K,
E extends Poolable> - Parameters:
key
-- Returns:
- true, if successful
-
containsValue
- Specified by:
containsValue
in interfaceKeyedObjectPool<K,
E extends Poolable> - Parameters:
e
-- Returns:
- true, if successful
-
keySet
- Specified by:
keySet
in interfaceKeyedObjectPool<K,
E extends Poolable> - Returns:
- Set
-
values
- Specified by:
values
in interfaceKeyedObjectPool<K,
E extends Poolable> - Returns:
- Collection
-
clear
public void clear()Clear. -
close
public void close()Close. -
vacate
public void vacate()Vacate. -
size
public int size() -
hashCode
public int hashCode() -
equals
-
toString
-