public class DefaultCacheEntryView extends Object implements CacheEntryView<Data,Data>, IdentifiedDataSerializable, Versioned
CacheEntryView.| Constructor and Description |
|---|
DefaultCacheEntryView() |
DefaultCacheEntryView(Data key,
Data value,
long creationTime,
long expirationTime,
long lastAccessTime,
long accessHit,
Data expiryPolicy) |
| Modifier and Type | Method and Description |
|---|---|
long |
getAccessHit()
Gets the count of how many time this cache entry has been accessed.
|
long |
getCreationTime()
Gets the creation time of this
EvictableEntryView in milliseconds. |
long |
getExpirationTime()
Gets the expiration time in milliseconds of the cache entry.
|
Data |
getExpiryPolicy()
Gets the expiry policy associated with this entry if any
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
Data |
getKey()
Gets the key of the cache entry.
|
long |
getLastAccessTime()
Gets the last access time in milliseconds of the cache entry.
|
Data |
getValue()
Gets the value of the cache entry.
|
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public Data getKey()
CacheEntryViewgetKey in interface CacheEntryView<Data,Data>getKey in interface EvictableEntryView<Data,Data>public Data getValue()
CacheEntryViewgetValue in interface CacheEntryView<Data,Data>getValue in interface EvictableEntryView<Data,Data>public long getCreationTime()
EvictableEntryViewEvictableEntryView in milliseconds.getCreationTime in interface EvictableEntryView<Data,Data>EvictableEntryView in millisecondspublic long getExpirationTime()
CacheEntryViewgetExpirationTime in interface CacheEntryView<Data,Data>public long getLastAccessTime()
CacheEntryViewgetLastAccessTime in interface CacheEntryView<Data,Data>getLastAccessTime in interface EvictableEntryView<Data,Data>public long getAccessHit()
CacheEntryViewgetAccessHit in interface CacheEntryView<Data,Data>getAccessHit in interface EvictableEntryView<Data,Data>public Data getExpiryPolicy()
getExpiryPolicy in interface CacheEntryView<Data,Data>nullpublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializableout - 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
DataSerializablereadData in interface DataSerializablein - inputIOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
input stream has been closed.public int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic int getId()
IdentifiedDataSerializablegetId in interface IdentifiedDataSerializableCopyright © 2019 Hazelcast, Inc.. All Rights Reserved.