|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.amazon.carbonado.util.AbstractPool<K,V,E>
public abstract class AbstractPool<K,V,E extends Exception>
A concurrent pool of strongly referenced values mapped by key. Values are lazily created and pooled.
| Constructor Summary | |
|---|---|
protected |
AbstractPool()
|
| Method Summary | |
|---|---|
protected abstract V |
create(K key)
Return a new value instance. |
V |
get(K key)
Returns a value for the given key, which is lazily created and pooled. |
V |
remove(Object key)
Remove a value, returning the old value. |
Collection<V> |
values()
Returns the pool values, which may be concurrently modified. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractPool()
| Method Detail |
|---|
public V get(K key)
throws E extends Exception
E extends Exceptionpublic V remove(Object key)
public Collection<V> values()
protected abstract V create(K key)
throws E extends Exception
E extends Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||