K
- the type of key.V
- the type of value.public class SimpleEntryView<K,V> extends Object implements EntryView<K,V>, IdentifiedDataSerializable, Versioned
EntryView
and also it is writable.Constructor and Description |
---|
SimpleEntryView() |
SimpleEntryView(K key,
V value) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
long |
getCost()
Returns the cost (in bytes) of the entry.
|
long |
getCreationTime()
Returns the creation time of the entry.
|
long |
getEvictionCriteriaNumber()
Needed for client protocol compatibility.
|
long |
getExpirationTime()
Returns the expiration time of the entry.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
long |
getHits()
Returns number of hits of the entry.
|
int |
getId()
Returns type identifier for this class.
|
K |
getKey()
Returns the key of the entry.
|
long |
getLastAccessTime()
Returns the last access time for the entry.
|
long |
getLastStoredTime()
Returns the last time the value was flushed to its store (e.g.
|
long |
getLastUpdateTime()
Returns the last time the value was updated.
|
Long |
getMaxIdle()
Returns the last set max idle time in milliseconds.
|
long |
getTtl()
Returns the last set time to live in milliseconds.
|
V |
getValue()
Returns the value of the entry.
|
long |
getVersion()
Returns the version of the entry.
|
int |
hashCode() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
void |
setCost(long cost) |
void |
setCreationTime(long creationTime) |
void |
setEvictionCriteriaNumber(long evictionCriteriaNumber)
Needed for client protocol compatibility.
|
void |
setExpirationTime(long expirationTime) |
void |
setHits(long hits) |
void |
setKey(K key) |
void |
setLastAccessTime(long lastAccessTime) |
void |
setLastStoredTime(long lastStoredTime) |
void |
setLastUpdateTime(long lastUpdateTime) |
void |
setMaxIdle(long maxIdle) |
void |
setTtl(long ttl) |
void |
setValue(V value) |
void |
setVersion(long version) |
String |
toString() |
SimpleEntryView<K,V> |
withCost(long cost) |
SimpleEntryView<K,V> |
withCreationTime(long creationTime) |
SimpleEntryView<K,V> |
withExpirationTime(long expirationTime) |
SimpleEntryView<K,V> |
withHits(long hits) |
SimpleEntryView<K,V> |
withKey(K key) |
SimpleEntryView<K,V> |
withLastAccessTime(long lastAccessTime) |
SimpleEntryView<K,V> |
withLastStoredTime(long lastStoredTime) |
SimpleEntryView<K,V> |
withLastUpdateTime(long lastUpdateTime) |
SimpleEntryView<K,V> |
withMaxIdle(long maxIdle) |
SimpleEntryView<K,V> |
withTtl(long ttl) |
SimpleEntryView<K,V> |
withValue(V value) |
SimpleEntryView<K,V> |
withVersion(long version) |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public void setKey(K key)
public SimpleEntryView<K,V> withKey(K key)
public V getValue()
EntryView
public void setValue(V value)
public SimpleEntryView<K,V> withValue(V value)
public long getCost()
EntryView
Warning: This method returns -1
if statistics are not enabled or not implemented.
public void setCost(long cost)
public SimpleEntryView<K,V> withCost(long cost)
public long getCreationTime()
EntryView
Warning: This method returns -1
if statistics are not enabled or not implemented.
getCreationTime
in interface EntryView<K,V>
public void setCreationTime(long creationTime)
public SimpleEntryView<K,V> withCreationTime(long creationTime)
public long getExpirationTime()
EntryView
getExpirationTime
in interface EntryView<K,V>
public void setExpirationTime(long expirationTime)
public SimpleEntryView<K,V> withExpirationTime(long expirationTime)
public long getHits()
EntryView
Warning: This method returns -1
if statistics are not enabled or not implemented.
public void setHits(long hits)
public SimpleEntryView<K,V> withHits(long hits)
public long getLastAccessTime()
EntryView
Warning: This method returns -1
if statistics are not enabled or not implemented.
getLastAccessTime
in interface EntryView<K,V>
public void setLastAccessTime(long lastAccessTime)
public SimpleEntryView<K,V> withLastAccessTime(long lastAccessTime)
public long getLastStoredTime()
EntryView
MapStore
).
Warning: This method returns -1
if statistics are not enabled or not implemented.
getLastStoredTime
in interface EntryView<K,V>
public void setLastStoredTime(long lastStoredTime)
public SimpleEntryView<K,V> withLastStoredTime(long lastStoredTime)
public long getLastUpdateTime()
EntryView
Warning: This method returns -1
if statistics are not enabled or not implemented.
getLastUpdateTime
in interface EntryView<K,V>
public void setLastUpdateTime(long lastUpdateTime)
public SimpleEntryView<K,V> withLastUpdateTime(long lastUpdateTime)
public long getVersion()
EntryView
getVersion
in interface EntryView<K,V>
public void setVersion(long version)
public SimpleEntryView<K,V> withVersion(long version)
public long getTtl()
EntryView
public void setTtl(long ttl)
public SimpleEntryView<K,V> withTtl(long ttl)
public Long getMaxIdle()
EntryView
getMaxIdle
in interface EntryView<K,V>
public void setMaxIdle(long maxIdle)
public SimpleEntryView<K,V> withMaxIdle(long maxIdle)
public long getEvictionCriteriaNumber()
public void setEvictionCriteriaNumber(long evictionCriteriaNumber)
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
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
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.