|
ehcache | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ehcache.Element
A Cache Element, consisting of a key, value and attributes.
Field Summary | |
(package private) static long |
serialVersionUID
serial version |
Constructor Summary | |
Element(java.io.Serializable key,
java.io.Serializable value)
Constructor |
|
Element(java.io.Serializable key,
java.io.Serializable value,
long version)
A full constructor. |
Method Summary | |
java.lang.Object |
clone()
Clones an Element. |
long |
getCreationTime()
Gets the creationTime attribute of the ElementAttributes object |
long |
getHitCount()
Gets the hit count on this element. |
java.io.Serializable |
getKey()
Gets the key attribute of the Element object |
long |
getLastAccessTime()
Gets the last access time. |
(package private) long |
getNextToLastAccessTime()
Gets the next to last access time. |
long |
getSerializedSize()
The size of this object in serialized form. |
java.io.Serializable |
getValue()
Gets the value attribute of the Element object |
long |
getVersion()
Gets the version attribute of the ElementAttributes object |
int |
hashCode()
Description of the Method |
void |
resetAccessStatistics()
Resets the hit count to 0 and the last access time to 0 |
void |
setCreateTime()
Sets the creationTime attribute of the ElementAttributes object |
void |
setVersion(long version)
Sets the version attribute of the ElementAttributes object |
java.lang.String |
toString()
Returns a String representation of the Element |
void |
updateAccessStatistics()
Sets the last access time to now. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
static final long serialVersionUID
Constructor Detail |
public Element(java.io.Serializable key, java.io.Serializable value, long version)
public Element(java.io.Serializable key, java.io.Serializable value)
key
- value
- Method Detail |
public java.io.Serializable getKey()
public java.io.Serializable getValue()
public int hashCode()
public void setVersion(long version)
version
- The new version valuepublic long getCreationTime()
public void setCreateTime()
public long getVersion()
public long getLastAccessTime()
Element
will have a last access time equal to its create time.
long getNextToLastAccessTime()
getLastAccessTime()
public long getHitCount()
public void resetAccessStatistics()
public void updateAccessStatistics()
public java.lang.String toString()
String
representation of the Element
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Element
, with exactly the same field values as the one it was cloned from.
java.lang.CloneNotSupportedException
public long getSerializedSize()
|
ehcache | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |