|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BlockingMap<K,V>
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Method Summary | |
|---|---|
Future<V> |
asyncPoll(K key,
long timeout,
TimeUnit unit)
Polls for an entry in a background thread. |
Future<V> |
asyncTake(K key)
Waits for an entry in a background thread. |
boolean |
give(K key,
V value)
Adds an entry only if there's already a consumer waiting for the value. |
V |
poll(K key,
long timeout,
TimeUnit unit)
Waits for the specified amount of time for an entry with the given key and returns the associated value. |
V |
take(K key)
Waits for an entry for the given key and returns the associated value. |
| Methods inherited from interface java.util.Map |
|---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
| Method Detail |
|---|
boolean give(K key,
V value)
key - value -
V take(K key)
throws InterruptedException
key -
InterruptedException
Future<V> asyncTake(K key)
throws InterruptedException
key -
InterruptedException
V poll(K key,
long timeout,
TimeUnit unit)
throws InterruptedException
key - timeout - unit -
InterruptedException
Future<V> asyncPoll(K key,
long timeout,
TimeUnit unit)
throws InterruptedException
key -
InterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||