railo.commons.io.cache
Interface CacheEntry

All Known Implementing Classes:
EHCacheEntry, RamCacheEntry, RESTCacheEntry, SoapCacheEntry

public interface CacheEntry

interface for a entry inside the cache, this interface is read-only


Method Summary
 Date created()
          when was the entry created.
 Struct getCustomInfo()
          get all information data available for this entry
 String getKey()
           
 Object getValue()
           
 int hitCount()
          how many time was the entry accessed? this information is optional and depends on the implementation, when information is not available -1 is returned
 long idleTimeSpan()
          time in milliseconds after which the object is flushed from the cache if it is not accessed during that time.
 Date lastHit()
          when was the entry accessed last time.
 Date lastModified()
          when was the entry last time modified.
 long liveTimeSpan()
          define time until the entry is valid
 long size()
          the size of the object
 

Method Detail

lastHit

Date lastHit()
when was the entry accessed last time. this information is optional and depends on the implementation, when information is not available -1 is returned

Returns:
time in milliseconds since 1/1/1970 GMT

lastModified

Date lastModified()
when was the entry last time modified. this information is optional and depends on the implementation, when information is not available -1 is returned

Returns:
time offset in milliseconds since 1/1/1970 GMT

created

Date created()
when was the entry created. this information is optional and depends on the implementation, when information is not available -1 is returned

Returns:
time offset in milliseconds since 1/1/1970 GMT

hitCount

int hitCount()
how many time was the entry accessed? this information is optional and depends on the implementation, when information is not available -1 is returned

Returns:
access count

getKey

String getKey()
Returns:
the key associated with this entry

getValue

Object getValue()
Returns:
the value associated with this entry

size

long size()
the size of the object

Returns:
size of the object

liveTimeSpan

long liveTimeSpan()
define time until the entry is valid

Returns:
time offset in milliseconds since 1/1/1970 GMT or Long.MIN_VALUE if value is not defined

idleTimeSpan

long idleTimeSpan()
time in milliseconds after which the object is flushed from the cache if it is not accessed during that time.

Returns:
time milliseconds since 1/1/1970 GMT or Long.MIN_VALUE if value is not defined

getCustomInfo

Struct getCustomInfo()
get all information data available for this entry



Copyright © 2012 Railo