|
|||||||||||
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.
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 | |
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. |
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 previous to last access time to the last access time, and the last access time to now. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Element(java.io.Serializable key, java.io.Serializable value, long version)
Creation time is set to the current time. Last Access Time and Previous To Last Access Time are not set.
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.
public long getHitCount()
public void resetAccessStatistics()
public void updateAccessStatistics()
public java.lang.String toString()
String
representation of the Element
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |