public class HDRecord extends HiDensityRecord implements com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>
Record implementation for IMap.| Modifier and Type | Field and Description |
|---|---|
protected HiDensityRecordAccessor<HDRecord> |
recordAccessor |
static int |
SIZE
Gives the size of an
HDRecord. |
| Constructor and Description |
|---|
HDRecord(HiDensityRecordAccessor<HDRecord> recordAccessor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
casCachedValue(Object expectedValue,
Object newValue) |
void |
clear()
Clears value (address), creation times, access times, etc.
|
boolean |
equals(Object o) |
Object |
getCachedValueUnsafe() |
long |
getCost() |
long |
getCreationTime() |
long |
getExpirationTime() |
long |
getHits() |
com.hazelcast.nio.serialization.Data |
getKey() |
long |
getKeyAddress() |
long |
getLastAccessTime() |
long |
getLastStoredTime() |
long |
getLastUpdateTime() |
long |
getMaxIdle() |
com.hazelcast.query.Metadata |
getMetadata()
Note: Metadata is stored on-heap
|
long |
getSequence()
Returns sequence ID associated with this record.
|
protected int |
getSize() |
long |
getTtl() |
com.hazelcast.nio.serialization.Data |
getValue() |
long |
getValueAddress()
Gets the address of value for this
HiDensityRecord. |
long |
getVersion()
Version field is used as tombstone-sequence, after removing the record.
|
int |
hashCode() |
void |
onAccess(long now) |
void |
onStore() |
void |
onUpdate(long now) |
HiDensityRecord |
reset(long address)
Resets the address of this
HiDensityRecord to specified address
and this HiDensityRecord shows that allocated record area. |
void |
setCreationTime(long creationTime) |
void |
setExpirationTime(long expirationTime) |
void |
setHits(long hits) |
void |
setKey(com.hazelcast.nio.serialization.Data key) |
void |
setKeyAddress(long address) |
void |
setLastAccessTime(long lastAccessTime) |
void |
setLastStoredTime(long lastStoredTime) |
void |
setLastUpdateTime(long lastUpdatedTime) |
void |
setMaxIdle(long maxIdle) |
void |
setMetadata(com.hazelcast.query.Metadata metadata)
Note: Metadata is stored on-heap
|
void |
setSequence(long sequence)
Since the address can be re-used, sequence provides a unique number () for the pointer.
|
void |
setTtl(long ttl) |
void |
setValue(com.hazelcast.nio.serialization.Data value) |
void |
setValueAddress(long valueAddress)
Sets the address of value for this
HiDensityRecord. |
void |
setVersion(long version)
Version field is used as tombstone-sequence, after removing the record.
|
address, copyFrom, copyFromByteArray, copyTo, copyToByteArray, readByte, readChar, readDouble, readFloat, readInt, readLong, readShort, setAddress, setSize, size, toString, writeByte, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeShort, zeropublic static final int SIZE
HDRecord.protected final HiDensityRecordAccessor<HDRecord> recordAccessor
public HDRecord(HiDensityRecordAccessor<HDRecord> recordAccessor)
protected int getSize()
public com.hazelcast.nio.serialization.Data getValue()
getValue in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public void setValue(com.hazelcast.nio.serialization.Data value)
setValue in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public void setKey(com.hazelcast.nio.serialization.Data key)
setKey in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public com.hazelcast.nio.serialization.Data getKey()
getKey in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public void onAccess(long now)
onAccess in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public void onUpdate(long now)
onUpdate in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public void onStore()
onStore in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public long getCost()
getCost in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public long getSequence()
HiDensityRecordgetSequence in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>getSequence in class HiDensityRecordpublic void setSequence(long sequence)
setSequence in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>sequence - public Object getCachedValueUnsafe()
getCachedValueUnsafe in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public boolean casCachedValue(Object expectedValue, Object newValue)
casCachedValue in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public HiDensityRecord reset(long address)
HiDensityRecordHiDensityRecord to specified address
and this HiDensityRecord shows that allocated record area.reset in class HiDensityRecordaddress - the address of allocated record area for this HiDensityRecordHiDensityRecord instancepublic void clear()
HiDensityRecordHiDensityRecord.clear in class HiDensityRecordpublic long getKeyAddress()
public void setKeyAddress(long address)
public long getValueAddress()
HiDensityRecordHiDensityRecord.getValueAddress in class HiDensityRecordHiDensityRecord.public void setValueAddress(long valueAddress)
HiDensityRecordHiDensityRecord.setValueAddress in class HiDensityRecordvalueAddress - the address of value for this HiDensityRecordpublic long getVersion()
getVersion in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public void setVersion(long version)
setVersion in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>version - public long getCreationTime()
getCreationTime in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public void setCreationTime(long creationTime)
setCreationTime in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public long getTtl()
getTtl in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public void setTtl(long ttl)
setTtl in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public void setMaxIdle(long maxIdle)
setMaxIdle in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public long getMaxIdle()
getMaxIdle in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public long getLastAccessTime()
getLastAccessTime in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public void setLastAccessTime(long lastAccessTime)
setLastAccessTime in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public long getLastUpdateTime()
getLastUpdateTime in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public void setLastUpdateTime(long lastUpdatedTime)
setLastUpdateTime in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public long getHits()
getHits in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public void setHits(long hits)
setHits in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public long getLastStoredTime()
getLastStoredTime in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public void setLastStoredTime(long lastStoredTime)
setLastStoredTime in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public long getExpirationTime()
getExpirationTime in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public void setExpirationTime(long expirationTime)
setExpirationTime in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public void setMetadata(com.hazelcast.query.Metadata metadata)
setMetadata in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>metadata - public com.hazelcast.query.Metadata getMetadata()
getMetadata in interface com.hazelcast.map.impl.record.Record<com.hazelcast.nio.serialization.Data>public boolean equals(Object o)
equals in class com.hazelcast.memory.MemoryBlockpublic int hashCode()
hashCode in class com.hazelcast.memory.MemoryBlockCopyright © 2020 Hazelcast, Inc.. All Rights Reserved.