public class NativeMemoryNearCacheRecord extends HiDensityNearCacheRecord
HiDensityNearCacheRecord to store NativeMemoryData type objects.| Modifier and Type | Field and Description |
|---|---|
static int |
SIZE
Size of a Hi-Density Near Cache record.
|
static int |
VALUE_OFFSET
Location of the value pointer in a Hi-Density Near Cache record.
|
| Constructor and Description |
|---|
NativeMemoryNearCacheRecord(HiDensityRecordAccessor<NativeMemoryNearCacheRecord> accessor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
casRecordState(long expected,
long update) |
void |
clear()
Clears value (address), creation times, access times, etc.
|
boolean |
equals(Object o) |
int |
getAccessHit() |
int |
getAccessTimeDiff()
Gets the access time difference which represents the passed time since previous access
of this
HiDensityNearCacheRecord in milliseconds. |
long |
getCreationTime() |
static long |
getCreationTime(long address) |
long |
getExpirationTime() |
long |
getInvalidationSequence() |
long |
getLastAccessTime() |
int |
getPartitionId() |
long |
getRecordState() |
long |
getSequence()
Returns sequence ID associated with this record.
|
int |
getTtlMillis()
Gets the TTL value of this
HiDensityNearCacheRecord in milliseconds. |
NativeMemoryData |
getValue() |
long |
getValueAddress()
Gets the address of value for this
HiDensityRecord. |
int |
hashCode() |
boolean |
hasSameUuid(UUID uuid) |
void |
incrementAccessHit() |
boolean |
isExpiredAt(long now) |
boolean |
isIdleAt(long maxIdleMilliSeconds,
long now) |
NativeMemoryNearCacheRecord |
reset(long address)
Resets the address of this
HiDensityRecord to specified address
and this HiDensityRecord shows that allocated record area. |
void |
resetAccessHit() |
void |
setAccessHit(int hit) |
void |
setAccessTime(long time) |
void |
setAccessTimeDiff(int time)
Sets the access time difference which represents the passed time since previous access
of this
HiDensityNearCacheRecord in milliseconds. |
void |
setCreationTime(long time) |
void |
setExpirationTime(long expirationTime) |
void |
setInvalidationSequence(long sequence) |
void |
setPartitionId(int partitionId) |
void |
setTtlMillis(int ttl)
Sets the TTL value of this
HiDensityNearCacheRecord in milliseconds. |
void |
setUuid(UUID uuid) |
void |
setValue(NativeMemoryData value) |
void |
setValueAddress(long valueAddress)
Sets the address of value for this
HiDensityRecord. |
String |
toString() |
address, copyFrom, copyFromByteArray, copyTo, copyToByteArray, readByte, readChar, readDouble, readFloat, readInt, readLong, readShort, setAddress, setSize, size, writeByte, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeShort, zeropublic static final int SIZE
public static final int VALUE_OFFSET
public NativeMemoryNearCacheRecord(HiDensityRecordAccessor<NativeMemoryNearCacheRecord> accessor)
public long getCreationTime()
public void setCreationTime(long time)
public long getLastAccessTime()
public void setAccessTime(long time)
public int getAccessTimeDiff()
HiDensityNearCacheRecordHiDensityNearCacheRecord in milliseconds.getAccessTimeDiff in class HiDensityNearCacheRecordHiDensityNearCacheRecord in milliseconds.public void setAccessTimeDiff(int time)
HiDensityNearCacheRecordHiDensityNearCacheRecord in milliseconds.setAccessTimeDiff in class HiDensityNearCacheRecordtime - the access time difference of this HiDensityNearCacheRecord in milliseconds.public int getAccessHit()
public void setAccessHit(int hit)
public void incrementAccessHit()
public void resetAccessHit()
public int getTtlMillis()
HiDensityNearCacheRecordHiDensityNearCacheRecord in milliseconds.getTtlMillis in class HiDensityNearCacheRecordHiDensityNearCacheRecord in milliseconds.public void setTtlMillis(int ttl)
HiDensityNearCacheRecordHiDensityNearCacheRecord in milliseconds.setTtlMillis in class HiDensityNearCacheRecordttl - the TTL value for this HiDensityNearCacheRecord in milliseconds.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 NativeMemoryNearCacheRecord 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 NativeMemoryData getValue()
public void setValue(NativeMemoryData value)
public long getExpirationTime()
public void setExpirationTime(long expirationTime)
public boolean isExpiredAt(long now)
public boolean isIdleAt(long maxIdleMilliSeconds,
long now)
public static long getCreationTime(long address)
public long getSequence()
HiDensityRecordgetSequence in class HiDensityRecordpublic long getRecordState()
public boolean casRecordState(long expected,
long update)
public int getPartitionId()
public void setPartitionId(int partitionId)
public long getInvalidationSequence()
public void setInvalidationSequence(long sequence)
public void setUuid(UUID uuid)
public boolean hasSameUuid(UUID uuid)
public boolean equals(Object o)
equals in class com.hazelcast.memory.MemoryBlockpublic int hashCode()
hashCode in class com.hazelcast.memory.MemoryBlockpublic String toString()
toString in class com.hazelcast.memory.MemoryBlockCopyright © 2021 Hazelcast, Inc.. All Rights Reserved.