public class CacheObjectRecord extends AbstractCacheRecord<Object,javax.cache.expiry.ExpiryPolicy>
CacheRecord
which has an internal object format.Modifier and Type | Field and Description |
---|---|
protected javax.cache.expiry.ExpiryPolicy |
expiryPolicy |
protected Object |
value |
accessHit, accessTime, creationTime, expirationTime, EXPIRY_POLICY_VERSION
TIME_NOT_AVAILABLE
Constructor and Description |
---|
CacheObjectRecord() |
CacheObjectRecord(Object value,
long creationTime,
long expiryTime) |
Modifier and Type | Method and Description |
---|---|
javax.cache.expiry.ExpiryPolicy |
getExpiryPolicy()
Gets the expiryPolicy associated with this record.
|
int |
getId()
Returns type identifier for this class.
|
Object |
getValue()
Gets the value of this
Evictable . |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
void |
setExpiryPolicy(javax.cache.expiry.ExpiryPolicy expiryPolicy)
Sets the expiry policy for this record.
|
void |
setValue(Object value)
Sets the value of this
CacheRecord . |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
getAccessHit, getCreationTime, getExpirationTime, getFactoryId, getLastAccessTime, incrementAccessHit, isExpiredAt, resetAccessHit, setAccessHit, setAccessTime, setCreationTime, setExpirationTime
protected Object value
protected javax.cache.expiry.ExpiryPolicy expiryPolicy
public CacheObjectRecord()
public CacheObjectRecord(Object value, long creationTime, long expiryTime)
public Object getValue()
Evictable
Evictable
.Evictable
public void setValue(Object value)
CacheRecord
CacheRecord
.value
- the value for this CacheRecord
public void setExpiryPolicy(javax.cache.expiry.ExpiryPolicy expiryPolicy)
CacheRecord
public javax.cache.expiry.ExpiryPolicy getExpiryPolicy()
CacheRecord
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
writeData
in class AbstractCacheRecord<Object,javax.cache.expiry.ExpiryPolicy>
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
readData
in class AbstractCacheRecord<Object,javax.cache.expiry.ExpiryPolicy>
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.public int getId()
IdentifiedDataSerializable
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.