public class HashSlotArray16byteKeyNoValue extends HashSlotArray16byteKeyImpl
key1
field, therefore the chosen null-sentinel value
is not valid as the value of key1
.HashSlotArrayBase.Cursor, HashSlotArrayBase.CursorIntKey2, HashSlotArrayBase.CursorLongKey2
CAPACITY_OFFSET, EXPAND_THRESHOLD_OFFSET, HEADER_SIZE, KEY_1_OFFSET, KEY_2_OFFSET, offsetOfUnassignedSentinel, SIZE_OFFSET, slotLength, unassignedSentinel, VALUE_SIZE_GRANULARITY
Constructor and Description |
---|
HashSlotArray16byteKeyNoValue(long nullKey1,
MemoryManager mm) |
HashSlotArray16byteKeyNoValue(long nullKey1,
MemoryManager mm,
int initialCapacity,
float loadFactor) |
Modifier and Type | Method and Description |
---|---|
long |
ensure(long key1,
long key2)
Ensures that there is a mapping from
(key1, key2) to a slot in the array. |
long |
get(long key1,
long key2)
Returns the address of the value block mapped by
(key1, key2) . |
boolean |
remove(long key1,
long key2)
Removes the mapping for
(key1, key2) , if any. |
protected boolean |
valueLengthValid(int valueLength) |
addrOfKey1At, addrOfKey2At, addrOfValueAt, cursor, valueAddr2slotBase
address, allocateArrayAndAdjustFields, assertValid, capacity, clear, dispose, ensure0, equal, expansionThreshold, get0, gotoAddress, gotoNew, isAssigned, key1OfSlot, key2OfSlot, keyHash, malloc, markUnassigned, mem, migrateTo, putKey, rehash, remove0, resizeTo, setMemMgr, shiftConflictingKeys, size, slotBase, slotHash, trimToSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
address, capacity, clear, expansionThreshold, gotoAddress, gotoNew, size, trimToSize
dispose
public HashSlotArray16byteKeyNoValue(long nullKey1, MemoryManager mm, int initialCapacity, float loadFactor)
nullKey1
- the null-sentinel value checked against the key1
field.public HashSlotArray16byteKeyNoValue(long nullKey1, MemoryManager mm)
nullKey1
- the null-sentinel value checked against the key1
field.protected boolean valueLengthValid(int valueLength)
valueLengthValid
in class HashSlotArray16byteKeyImpl
public long ensure(long key1, long key2)
HashSlotArray16byteKeyImpl
(key1, key2)
to a slot in the array.
The abs
of the returned integer is the address of the slot's value block.
The returned integer is positive if a new slot had to be assigned and negative
if the slot was already assigned.
Whenever this method returns a positive value, the caller must ensure that the null-sentinel value
at the returned address is overwritten with a non-null-sentinel value.ensure
in interface HashSlotArray16byteKey
ensure
in class HashSlotArray16byteKeyImpl
key1
- key part 1key2
- key part 2public long get(long key1, long key2)
HashSlotArray16byteKey
(key1, key2)
.get
in interface HashSlotArray16byteKey
get
in class HashSlotArray16byteKeyImpl
key1
- key part 1key2
- key part 2MemoryAllocator.NULL_ADDRESS
if no mapping for (key1, key2)
exists.public boolean remove(long key1, long key2)
HashSlotArray16byteKey
(key1, key2)
, if any.remove
in interface HashSlotArray16byteKey
remove
in class HashSlotArray16byteKeyImpl
key1
- key part 1key2
- key part 2Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.