ehcache

net.sf.ehcache
Interface ElementEvictionData

All Superinterfaces:
Cloneable
All Known Implementing Classes:
DefaultElementEvictionData

public interface ElementEvictionData
extends Cloneable

Provides pluggable storage and configuration of TTI eviction data.

Version:
$Id: ElementEvictionData.java 5631 2012-05-10 08:31:33Z teck $
Author:
Geert Bevin

Method Summary
 boolean canParticipateInSerialization()
          Indicates whether the data of this element eviction instance can participate in serialization of the element as a whole.
 ElementEvictionData clone()
          Creates a clone of the eviction data
 long getCreationTime()
          Get the element's creation time.
 long getLastAccessTime()
          Gets the last access time.
 void resetLastAccessTime(Element element)
          Resets the last access time.
 void setCreationTime(long creationTime)
          Sets the element creation time.
 void updateLastAccessTime(long time, Element element)
          Updates the last access time.
 

Method Detail

setCreationTime

void setCreationTime(long creationTime)
Sets the element creation time. Note that this is optional to implement and might result in a no-op.

Parameters:
creationTime - the new element's creation time

getCreationTime

long getCreationTime()
Get the element's creation time.

Returns:
the element's creation time in seconds

getLastAccessTime

long getLastAccessTime()
Gets the last access time. Access means a get. So a newly created Element will have a last access time equal to its create time.

Returns:
the element's last access time in seconds

updateLastAccessTime

void updateLastAccessTime(long time,
                          Element element)
Updates the last access time.

Parameters:
time - the new last access time
element - the element for which the last access time is set

resetLastAccessTime

void resetLastAccessTime(Element element)
Resets the last access time.

Parameters:
element - the element for which the last access time is set

clone

ElementEvictionData clone()
                          throws CloneNotSupportedException
Creates a clone of the eviction data

Returns:
a clone of the eviction data
Throws:
CloneNotSupportedException

canParticipateInSerialization

boolean canParticipateInSerialization()
Indicates whether the data of this element eviction instance can participate in serialization of the element as a whole.

Returns:
true when the data can participate in serialization; or false otherwise

ehcache

Copyright © 2003-2014 Terracotta, Inc.. All Rights Reserved.