Class ConcurrentBusyWaitingLongLongMap
java.lang.Object
com.trivago.fastutilconcurrentwrapper.map.PrimitiveConcurrentMap
com.trivago.fastutilconcurrentwrapper.map.ConcurrentBusyWaitingLongLongMap
- All Implemented Interfaces:
LongLongMap,PrimitiveKeyMap,PrimitiveLongKeyMap
-
Field Summary
Fields inherited from class com.trivago.fastutilconcurrentwrapper.map.PrimitiveConcurrentMap
locks, numBucketsFields inherited from interface com.trivago.fastutilconcurrentwrapper.LongLongMap
DEFAULT_VALUE -
Constructor Summary
ConstructorsConstructorDescriptionConcurrentBusyWaitingLongLongMap(int numBuckets, int initialCapacity, float loadFactor, long defaultValue) -
Method Summary
Modifier and TypeMethodDescriptionlongcomputeIfAbsent(long key, it.unimi.dsi.fastutil.longs.Long2LongFunction mappingFunction) longcomputeIfPresent(long key, BiFunction<Long, Long, Long> mappingFunction) booleancontainsKey(long key) longget(long key) longbooleanisEmpty()longput(long key, long value) longremove(long key) booleanremove(long key, long value) intsize()Methods inherited from class com.trivago.fastutilconcurrentwrapper.map.PrimitiveConcurrentMap
getBucket, getBucket, isEmpty, size
-
Constructor Details
-
ConcurrentBusyWaitingLongLongMap
public ConcurrentBusyWaitingLongLongMap(int numBuckets, int initialCapacity, float loadFactor, long defaultValue)
-
-
Method Details
-
size
public int size()- Specified by:
sizein interfacePrimitiveKeyMap
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacePrimitiveKeyMap
-
containsKey
public boolean containsKey(long key) - Specified by:
containsKeyin interfacePrimitiveLongKeyMap
-
get
public long get(long key) - Specified by:
getin interfaceLongLongMap- Returns:
- 0 if the key is not present
-
put
public long put(long key, long value) - Specified by:
putin interfaceLongLongMap
-
getDefaultValue
public long getDefaultValue()- Specified by:
getDefaultValuein interfaceLongLongMap
-
remove
public long remove(long key) - Specified by:
removein interfaceLongLongMap
-
remove
public boolean remove(long key, long value) - Specified by:
removein interfaceLongLongMap
-
computeIfAbsent
public long computeIfAbsent(long key, it.unimi.dsi.fastutil.longs.Long2LongFunction mappingFunction) - Specified by:
computeIfAbsentin interfaceLongLongMap
-
computeIfPresent
- Specified by:
computeIfPresentin interfaceLongLongMap
-