public class RequestQueueMap<K,V> extends Object
Constructor and Description |
---|
RequestQueueMap() |
Modifier and Type | Method and Description |
---|---|
void |
addRequest(K key,
V value)
Adds a request with the specified key.
|
Map.Entry<K,ArrayList<V>> |
getRandomNonEmptyQueue()
Blocks until the queue is non-empty or shutdown has been called.
|
void |
returnKey(K key)
Returns a key that was previously retrieved, if there were new entries for the key add it back to the
set of returnable keys, otherwise remove it.
|
void |
shutDown()
Signals that this queue should be shutdown.
|
void |
unsetShutdown() |
public void shutDown()
public void addRequest(K key, V value)
public Map.Entry<K,ArrayList<V>> getRandomNonEmptyQueue()
public void returnKey(K key)
public void unsetShutdown()