|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.webbeans.util.collections.ForwardingObject
org.jboss.webbeans.util.collections.ForwardingMap<K,java.util.concurrent.Future<V>>
org.jboss.webbeans.util.collections.ConcurrentCache<K,V>
public class ConcurrentCache<K,V>
Represents a thread safe map
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Constructor Summary | |
---|---|
ConcurrentCache()
Constructor |
Method Summary | ||
---|---|---|
protected java.util.Map<K,java.util.concurrent.Future<V>> |
delegate()
Gets the delegate map |
|
|
getFuture(K key)
Gets the Future value from the map |
|
|
getValue(K key)
Gets a value from the map. |
|
|
putIfAbsent(K key,
java.util.concurrent.Callable<E> callable)
Adds an item to the map if it's not already there |
|
protected void |
rethrow(java.util.concurrent.ExecutionException e)
Examines and re-throws an exception |
Methods inherited from class org.jboss.webbeans.util.collections.ForwardingMap |
---|
clear, containsKey, containsValue, createEntrySet, createKeySet, createValues, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class org.jboss.webbeans.util.collections.ForwardingObject |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConcurrentCache()
Method Detail |
---|
public <T extends V> java.util.concurrent.Future<T> getFuture(K key)
key
- The key to look for
public <T extends V> T getValue(K key)
key
- The key to look for
public <E> E putIfAbsent(K key, java.util.concurrent.Callable<E> callable)
key
- The key to place the item undercallable
- The item, wrapped in a Callable instance
protected java.util.Map<K,java.util.concurrent.Future<V>> delegate()
delegate
in class ForwardingMap<K,java.util.concurrent.Future<V>>
protected void rethrow(java.util.concurrent.ExecutionException e)
e
- The exception that happened during execution
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |