K - the type of keys maintained by this mapV - the type of mapped valuespublic abstract class AbstractLockedOffHeapHashMap<K,V> extends OffHeapHashMap<K,V> implements Segment<K,V>
Subclasses must implement the readLock() and writeLock()
methods such that they return the correct locks under which read and write
operations must occur.
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractLockedOffHeapHashMap.LockedEntryIterator |
protected class |
AbstractLockedOffHeapHashMap.LockedEntrySet |
protected class |
AbstractLockedOffHeapHashMap.LockedKeyIterator |
protected class |
AbstractLockedOffHeapHashMap.LockedKeySet |
OffHeapHashMap.EncodingIterator, OffHeapHashMap.EncodingSet, OffHeapHashMap.EntryIterator, OffHeapHashMap.EntrySet, OffHeapHashMap.HashIterator<T>, OffHeapHashMap.KeyIterator, OffHeapHashMap.KeySetAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>ENCODING, ENTRY_BIT_SHIFT, ENTRY_SIZE, hashtable, hashTablePage, KEY_HASHCODE, modCount, removedSlots, reprobeLimit, RESERVED_STATUS_BITS, size, STATUS, STATUS_REMOVED, STATUS_USED, storageEngine, tableSource| Constructor and Description |
|---|
AbstractLockedOffHeapHashMap(PageSource source,
boolean tableAllocationsSteal,
StorageEngine<? super K,? super V> storageEngine) |
AbstractLockedOffHeapHashMap(PageSource source,
boolean tableAllocationsSteal,
StorageEngine<? super K,? super V> storageEngine,
int tableSize) |
AbstractLockedOffHeapHashMap(PageSource source,
StorageEngine<? super K,? super V> storageEngine) |
AbstractLockedOffHeapHashMap(PageSource source,
StorageEngine<? super K,? super V> storageEngine,
boolean bootstrap) |
AbstractLockedOffHeapHashMap(PageSource source,
StorageEngine<? super K,? super V> storageEngine,
int tableSize) |
AbstractLockedOffHeapHashMap(PageSource source,
StorageEngine<? super K,? super V> storageEngine,
int tableSize,
boolean bootstrap) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
MetadataTuple<V> |
computeIfAbsentWithMetadata(K key,
Function<? super K,? extends MetadataTuple<V>> mappingFunction) |
MetadataTuple<V> |
computeIfPresentWithMetadata(K key,
BiFunction<? super K,? super MetadataTuple<V>,? extends MetadataTuple<V>> remappingFunction) |
MetadataTuple<V> |
computeWithMetadata(K key,
BiFunction<? super K,? super MetadataTuple<V>,? extends MetadataTuple<V>> remappingFunction) |
boolean |
containsKey(Object key) |
protected Set<Map.Entry<K,V>> |
createEntrySet() |
protected Set<K> |
createKeySet() |
void |
destroy() |
boolean |
evict(int index,
boolean shrink) |
V |
fill(K key,
V value)
Associates the specified value with the specified key in this map.
|
V |
fill(K key,
V value,
int metadata) |
V |
get(Object key) |
Integer |
getAndSetMetadata(Object key,
int mask,
int values) |
Long |
getEncodingForHashAndBinary(int hash,
ByteBuffer binaryKey) |
Integer |
getMetadata(Object key,
int mask) |
V |
getValueAndSetMetadata(Object key,
int mask,
int values) |
long |
installMappingForHashAndEncoding(int pojoHash,
ByteBuffer offheapBinaryKey,
ByteBuffer offheapBinaryValue,
int metadata) |
V |
put(K key,
V value) |
V |
put(K key,
V value,
int metadata) |
V |
putIfAbsent(K key,
V value) |
abstract Lock |
readLock() |
V |
remove(Object key) |
boolean |
remove(Object key,
Object value) |
Map<K,V> |
removeAllWithHash(int hash)
Remove all keys having a specific hashcode.
|
protected boolean |
removeMapping(Object o) |
boolean |
removeNoReturn(Object key) |
V |
replace(K key,
V value) |
boolean |
replace(K key,
V oldValue,
V newValue) |
boolean |
shrink() |
int |
size() |
abstract Lock |
writeLock() |
added, createEncodingSet, encodingSet, entrySet, fill, freePendingTables, getAllocatedMemory, getAtTableOffset, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getEntryAtTableOffset, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSize, getSlotForHashAndEncoding, getStorageEngine, getTableCapacity, getUsedSlotCount, getVitalMemory, hit, indexFor, indexFor, isAvailable, isPresent, isRemoved, isRemoved, isTerminating, isTerminating, isThiefForTableAllocations, keySet, readLong, readLong, removeAtTableOffset, removed, shrinkTable, spread, storageEngineFailure, tableExpansionFailure, tryIncreaseReprobe, updated, updateEncodingclone, containsValue, equals, hashCode, isEmpty, putAll, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAllgetAllocatedMemory, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSize, getTableCapacity, getUsedSlotCount, getVitalMemorypublic AbstractLockedOffHeapHashMap(PageSource source, StorageEngine<? super K,? super V> storageEngine)
public AbstractLockedOffHeapHashMap(PageSource source, boolean tableAllocationsSteal, StorageEngine<? super K,? super V> storageEngine)
public AbstractLockedOffHeapHashMap(PageSource source, StorageEngine<? super K,? super V> storageEngine, boolean bootstrap)
public AbstractLockedOffHeapHashMap(PageSource source, StorageEngine<? super K,? super V> storageEngine, int tableSize)
public AbstractLockedOffHeapHashMap(PageSource source, boolean tableAllocationsSteal, StorageEngine<? super K,? super V> storageEngine, int tableSize)
public AbstractLockedOffHeapHashMap(PageSource source, StorageEngine<? super K,? super V> storageEngine, int tableSize, boolean bootstrap)
public int size()
public boolean containsKey(Object key)
containsKey in interface Map<K,V>containsKey in class OffHeapHashMap<K,V>public Long getEncodingForHashAndBinary(int hash, ByteBuffer binaryKey)
getEncodingForHashAndBinary in interface StorageEngine.OwnergetEncodingForHashAndBinary in class OffHeapHashMap<K,V>public long installMappingForHashAndEncoding(int pojoHash,
ByteBuffer offheapBinaryKey,
ByteBuffer offheapBinaryValue,
int metadata)
installMappingForHashAndEncoding in interface StorageEngine.OwnerinstallMappingForHashAndEncoding in class OffHeapHashMap<K,V>public V fill(K key, V value)
OffHeapHashMapfill in interface Segment<K,V>fill in class OffHeapHashMap<K,V>key - key with which the specified value is to be associatedvalue - value to be associated with the specified keypublic boolean removeNoReturn(Object key)
removeNoReturn in interface Segment<K,V>removeNoReturn in class OffHeapHashMap<K,V>public void clear()
public V putIfAbsent(K key, V value)
putIfAbsent in interface ConcurrentMap<K,V>putIfAbsent in interface Map<K,V>public Integer getMetadata(Object key, int mask)
getMetadata in interface Segment<K,V>getMetadata in class OffHeapHashMap<K,V>public Integer getAndSetMetadata(Object key, int mask, int values)
getAndSetMetadata in interface Segment<K,V>getAndSetMetadata in class OffHeapHashMap<K,V>public V getValueAndSetMetadata(Object key, int mask, int values)
getValueAndSetMetadata in interface Segment<K,V>getValueAndSetMetadata in class OffHeapHashMap<K,V>protected boolean removeMapping(Object o)
removeMapping in class OffHeapHashMap<K,V>public boolean evict(int index,
boolean shrink)
evict in interface StorageEngine.Ownerevict in class OffHeapHashMap<K,V>protected Set<Map.Entry<K,V>> createEntrySet()
createEntrySet in class OffHeapHashMap<K,V>protected Set<K> createKeySet()
createKeySet in class OffHeapHashMap<K,V>public void destroy()
public abstract Lock readLock()
readLock in interface ReadWriteLockreadLock in class OffHeapHashMap<K,V>public abstract Lock writeLock()
writeLock in interface ReadWriteLockwriteLock in class OffHeapHashMap<K,V>public MetadataTuple<V> computeWithMetadata(K key, BiFunction<? super K,? super MetadataTuple<V>,? extends MetadataTuple<V>> remappingFunction)
computeWithMetadata in interface Segment<K,V>computeWithMetadata in class OffHeapHashMap<K,V>public MetadataTuple<V> computeIfAbsentWithMetadata(K key, Function<? super K,? extends MetadataTuple<V>> mappingFunction)
computeIfAbsentWithMetadata in interface Segment<K,V>computeIfAbsentWithMetadata in class OffHeapHashMap<K,V>public MetadataTuple<V> computeIfPresentWithMetadata(K key, BiFunction<? super K,? super MetadataTuple<V>,? extends MetadataTuple<V>> remappingFunction)
computeIfPresentWithMetadata in interface Segment<K,V>computeIfPresentWithMetadata in class OffHeapHashMap<K,V>public Map<K,V> removeAllWithHash(int hash)
HashingMapremoveAllWithHash in interface HashingMap<K,V>removeAllWithHash in class OffHeapHashMap<K,V>hash - the hashcode of the keys to be removed.Map containing the removed mappings.Copyright © 2015–2024. All rights reserved.