com.hazelcast.map.impl
Class SimpleEntryView<K,V>

java.lang.Object
  extended by com.hazelcast.map.impl.SimpleEntryView<K,V>
Type Parameters:
K - the type of key.
V - the type of value.
All Implemented Interfaces:
EntryView<K,V>, DataSerializable, IdentifiedDataSerializable

public class SimpleEntryView<K,V>
extends Object
implements EntryView<K,V>, IdentifiedDataSerializable

SimpleEntryView is an implementation of EntryView and also it is writable.


Constructor Summary
SimpleEntryView()
           
SimpleEntryView(K key, V value)
           
 
Method Summary
 long getCost()
          Returns the cost (in bytes) of the entry.
 long getCreationTime()
          Returns the creation time of the entry.
 long getEvictionCriteriaNumber()
           
 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 mapstore.
 long getLastUpdateTime()
          Returns the last time the value was updated.
 long getTtl()
          Returns the last set time to live second.
 V getValue()
          Returns the value of the entry.
 long getVersion()
          Returns the version of the entry
 void readData(ObjectDataInput in)
          Reads fields from the input stream
 void setCost(long cost)
           
 void setCreationTime(long creationTime)
           
 void setEvictionCriteriaNumber(long evictionCriteriaNumber)
           
 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 setTtl(long ttl)
           
 void setValue(V value)
           
 void setVersion(long version)
           
 void writeData(ObjectDataOutput out)
          Writes object fields to output stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleEntryView

public SimpleEntryView(K key,
                       V value)

SimpleEntryView

public SimpleEntryView()
Method Detail

getKey

public K getKey()
Description copied from interface: EntryView
Returns the key of the entry.

Specified by:
getKey in interface EntryView<K,V>
Returns:
the key of the entry

setKey

public void setKey(K key)

getValue

public V getValue()
Description copied from interface: EntryView
Returns the value of the entry.

Specified by:
getValue in interface EntryView<K,V>
Returns:
the value of the entry

setValue

public void setValue(V value)

getCost

public long getCost()
Description copied from interface: EntryView
Returns the cost (in bytes) of the entry.

Warning:

This method returns -1 if statistics is not enabled.

Specified by:
getCost in interface EntryView<K,V>
Returns:
the cost in bytes of the entry

setCost

public void setCost(long cost)

getCreationTime

public long getCreationTime()
Description copied from interface: EntryView
Returns the creation time of the entry.

Warning:

This method returns -1 if statistics is not enabled.

Specified by:
getCreationTime in interface EntryView<K,V>
Returns:
the creation time of the entry

setCreationTime

public void setCreationTime(long creationTime)

getExpirationTime

public long getExpirationTime()
Description copied from interface: EntryView
Returns the expiration time of the entry.

Specified by:
getExpirationTime in interface EntryView<K,V>
Returns:
the expiration time of the entry

setExpirationTime

public void setExpirationTime(long expirationTime)

getHits

public long getHits()
Description copied from interface: EntryView
Returns number of hits of the entry.

Warning:

ˆ This method returns -1 if statistics is not enabled.

Specified by:
getHits in interface EntryView<K,V>
Returns:
number of hits of the entry

setHits

public void setHits(long hits)

getLastAccessTime

public long getLastAccessTime()
Description copied from interface: EntryView
Returns the last access time for the entry.

Warning:

ˆ This method returns -1 if statistics is not enabled.

Specified by:
getLastAccessTime in interface EntryView<K,V>
Returns:
the last access time for the entry

setLastAccessTime

public void setLastAccessTime(long lastAccessTime)

getLastStoredTime

public long getLastStoredTime()
Description copied from interface: EntryView
Returns the last time the value was flushed to mapstore.

Warning:

ˆ This method returns -1 if statistics is not enabled.

Specified by:
getLastStoredTime in interface EntryView<K,V>
Returns:
the last store time for the value

setLastStoredTime

public void setLastStoredTime(long lastStoredTime)

getLastUpdateTime

public long getLastUpdateTime()
Description copied from interface: EntryView
Returns the last time the value was updated.

Warning:

ˆ This method returns -1 if statistics is not enabled.

Specified by:
getLastUpdateTime in interface EntryView<K,V>
Returns:
the last time the value was updated

setLastUpdateTime

public void setLastUpdateTime(long lastUpdateTime)

getVersion

public long getVersion()
Description copied from interface: EntryView
Returns the version of the entry

Specified by:
getVersion in interface EntryView<K,V>
Returns:
the version of the entry

setVersion

public void setVersion(long version)

getEvictionCriteriaNumber

public long getEvictionCriteriaNumber()

setEvictionCriteriaNumber

public void setEvictionCriteriaNumber(long evictionCriteriaNumber)

getTtl

public long getTtl()
Description copied from interface: EntryView
Returns the last set time to live second.

Specified by:
getTtl in interface EntryView<K,V>
Returns:
the last set time to live second.

setTtl

public void setTtl(long ttl)

writeData

public void writeData(ObjectDataOutput out)
               throws IOException
Description copied from interface: DataSerializable
Writes object fields to output stream

Specified by:
writeData in interface DataSerializable
Parameters:
out - output
Throws:
IOException

readData

public void readData(ObjectDataInput in)
              throws IOException
Description copied from interface: DataSerializable
Reads fields from the input stream

Specified by:
readData in interface DataSerializable
Parameters:
in - input
Throws:
IOException

getFactoryId

public int getFactoryId()
Description copied from interface: IdentifiedDataSerializable
Returns DataSerializableFactory factory id for this class.

Specified by:
getFactoryId in interface IdentifiedDataSerializable
Returns:
factory id

getId

public int getId()
Description copied from interface: IdentifiedDataSerializable
Returns type identifier for this class. Id should be unique per DataSerializableFactory.

Specified by:
getId in interface IdentifiedDataSerializable
Returns:
type id


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.