|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.util.ConcurrentIndex<K,V>
K
- Key typeV
- Value type@InterfaceAudience.Private @InterfaceStability.Evolving public class ConcurrentIndex<K,V>
A simple concurrent map of sets. This is similar in concept to
Multiset
, with the following exceptions:
Constructor Summary | |
---|---|
ConcurrentIndex(Comparator<V> valueComparator)
Creates an instance using the DefaultValueSetFactory for sets, which in turn creates instances of ConcurrentSkipListSet |
|
ConcurrentIndex(com.google.common.base.Supplier<Set<V>> valueSetFactory)
Creates an instance with a specified factory object for sets to be associated with a given key. |
Method Summary | |
---|---|
void |
put(K key,
V value)
Associate a new unique value with a specified key. |
boolean |
remove(K key,
V value)
Removes the association between a specified key and value. |
Set<V> |
values(K key)
Get all values associated with a specified key or null if no values are associated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConcurrentIndex(com.google.common.base.Supplier<Set<V>> valueSetFactory)
valueSetFactory
- The factory instancepublic ConcurrentIndex(Comparator<V> valueComparator)
ConcurrentSkipListSet
valueComparator
- A Comparator
for value typesMethod Detail |
---|
public void put(K key, V value)
key
- The keyvalue
- An additional unique value we want to associate with a keypublic Set<V> values(K key)
ConcurrentModificationException
may be thrown.
key
- The key
public boolean remove(K key, V value)
key
- The specified keyvalue
- The value to disassociate with the key
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |