K - the key typeV - the value typepublic class ConcurrentMultiDequeMap<K,V> extends Object
| Constructor and Description |
|---|
ConcurrentMultiDequeMap()
Create a concurrent multi hash map.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(K key)
Checks if there are values associated with a key in the multimap.
|
ConcurrentLinkedDeque<V> |
get(K key)
Returns the queue associated with the given key.
|
Set<K> |
keys() |
V |
poll()
Retrieves and removes one item from the multi map.
|
V |
poll(K key)
Retrieves the least recently used item in the deque for the given key.
|
V |
pop()
Retrieves and removes one item from the multi map.
|
V |
pop(K key)
Retrieves the most recently used item in the deque for the given key.
|
V |
put(K key,
V value)
Add a new key value pair to the multimap.
|
boolean |
remove(K key,
V value)
Removes a key value pair in the multimap.
|
int |
size() |
Set<V> |
values() |
public ConcurrentMultiDequeMap()
public V put(K key, V value)
key - the key to putvalue - the value to putpublic ConcurrentLinkedDeque<V> get(K key)
key - the key to querypublic V poll()
public V pop()
public V poll(K key)
key - the key to poll an itempublic V pop(K key)
key - the key to poll an itempublic int size()
public boolean containsKey(K key)
key - the key to check/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/