Class ConcurrentLongLongPairHashMap
- java.lang.Object
- 
- org.apache.bookkeeper.util.collections.ConcurrentLongLongPairHashMap
 
- 
 public class ConcurrentLongLongPairHashMap extends java.lang.ObjectConcurrent hash map where both keys and values are composed of pairs of longs.(long,long) --> (long,long) Provides similar methods as a ConcurrentMap<K,V>but since it's an open hash map with linear probing, no node allocations are required to store the keys and values, and no boxing is required.Keys MUST be >= 0. 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static interfaceConcurrentLongLongPairHashMap.BiConsumerLongPairA BiConsumer Long pair.static classConcurrentLongLongPairHashMap.BuilderBuilder of ConcurrentLongLongPairHashMap.static interfaceConcurrentLongLongPairHashMap.LongLongPairFunctionA Long pair function.static interfaceConcurrentLongLongPairHashMap.LongLongPairPredicateA Long pair predicate.static classConcurrentLongLongPairHashMap.LongPairA pair of long values.
 - 
Constructor SummaryConstructors Constructor Description ConcurrentLongLongPairHashMap()Deprecated.ConcurrentLongLongPairHashMap(int expectedItems)Deprecated.ConcurrentLongLongPairHashMap(int expectedItems, int concurrencyLevel)Deprecated.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<ConcurrentLongLongPairHashMap.LongPair,ConcurrentLongLongPairHashMap.LongPair>asMap()longcapacity()voidclear()booleancontainsKey(long key1, long key2)voidforEach(ConcurrentLongLongPairHashMap.BiConsumerLongPair processor)ConcurrentLongLongPairHashMap.LongPairget(long key1, long key2)(package private) longgetUsedBucketCount()(package private) static longhash(long key1, long key2)booleanisEmpty()java.util.List<ConcurrentLongLongPairHashMap.LongPair>keys()static ConcurrentLongLongPairHashMap.BuildernewBuilder()booleanput(long key1, long key2, long value1, long value2)booleanputIfAbsent(long key1, long key2, long value1, long value2)booleanremove(long key1, long key2)Remove an existing entry if found.booleanremove(long key1, long key2, long value1, long value2)(package private) static intsignSafeMod(long n, int max)longsize()java.util.List<ConcurrentLongLongPairHashMap.LongPair>values()
 
- 
- 
- 
Constructor Detail- 
ConcurrentLongLongPairHashMap@Deprecated public ConcurrentLongLongPairHashMap() Deprecated.
 - 
ConcurrentLongLongPairHashMap@Deprecated public ConcurrentLongLongPairHashMap(int expectedItems) Deprecated.
 - 
ConcurrentLongLongPairHashMap@Deprecated public ConcurrentLongLongPairHashMap(int expectedItems, int concurrencyLevel)Deprecated.
 
- 
 - 
Method Detail- 
newBuilderpublic static ConcurrentLongLongPairHashMap.Builder newBuilder() 
 - 
sizepublic long size() 
 - 
capacitypublic long capacity() 
 - 
isEmptypublic boolean isEmpty() 
 - 
getUsedBucketCountlong getUsedBucketCount() 
 - 
getpublic ConcurrentLongLongPairHashMap.LongPair get(long key1, long key2) - Parameters:
- key-
- Returns:
- the value or -1 if the key was not present
 
 - 
containsKeypublic boolean containsKey(long key1, long key2)
 - 
putpublic boolean put(long key1, long key2, long value1, long value2)
 - 
putIfAbsentpublic boolean putIfAbsent(long key1, long key2, long value1, long value2)
 - 
removepublic boolean remove(long key1, long key2)Remove an existing entry if found.- Parameters:
- key-
- Returns:
- the value associated with the key or -1 if key was not present
 
 - 
removepublic boolean remove(long key1, long key2, long value1, long value2)
 - 
clearpublic void clear() 
 - 
forEachpublic void forEach(ConcurrentLongLongPairHashMap.BiConsumerLongPair processor) 
 - 
keyspublic java.util.List<ConcurrentLongLongPairHashMap.LongPair> keys() - Returns:
- a new list of all keys (makes a copy)
 
 - 
valuespublic java.util.List<ConcurrentLongLongPairHashMap.LongPair> values() 
 - 
asMappublic java.util.Map<ConcurrentLongLongPairHashMap.LongPair,ConcurrentLongLongPairHashMap.LongPair> asMap() 
 - 
hashstatic final long hash(long key1, long key2)
 - 
signSafeModstatic final int signSafeMod(long n, int max)
 
- 
 
-