railo.runtime.cache.ram
Class RamCacheEntry

java.lang.Object
  extended by railo.runtime.cache.ram.RamCacheEntry
All Implemented Interfaces:
CacheEntry

public class RamCacheEntry
extends Object
implements CacheEntry


Constructor Summary
RamCacheEntry(String key, Object value, long idleTime, long until)
           
 
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
 RamCacheEntry read()
           
 long size()
          the size of the object
 void update(Object value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RamCacheEntry

public RamCacheEntry(String key,
                     Object value,
                     long idleTime,
                     long until)
Method Detail

created

public Date created()
Description copied from interface: CacheEntry
when was the entry created. this information is optional and depends on the implementation, when information is not available -1 is returned

Specified by:
created in interface CacheEntry
Returns:
time offset in milliseconds since 1/1/1970 GMT
See Also:
CacheEntry.created()

getCustomInfo

public Struct getCustomInfo()
Description copied from interface: CacheEntry
get all information data available for this entry

Specified by:
getCustomInfo in interface CacheEntry
See Also:
CacheEntry.getCustomInfo()

getKey

public String getKey()
Specified by:
getKey in interface CacheEntry
Returns:
the key associated with this entry
See Also:
CacheEntry.getKey()

getValue

public Object getValue()
Specified by:
getValue in interface CacheEntry
Returns:
the value associated with this entry
See Also:
CacheEntry.getValue()

hitCount

public int hitCount()
Description copied from interface: CacheEntry
how many time was the entry accessed? this information is optional and depends on the implementation, when information is not available -1 is returned

Specified by:
hitCount in interface CacheEntry
Returns:
access count
See Also:
CacheEntry.hitCount()

idleTimeSpan

public long idleTimeSpan()
Description copied from interface: CacheEntry
time in milliseconds after which the object is flushed from the cache if it is not accessed during that time.

Specified by:
idleTimeSpan in interface CacheEntry
Returns:
time milliseconds since 1/1/1970 GMT or Long.MIN_VALUE if value is not defined
See Also:
CacheEntry.idleTimeSpan()

lastHit

public Date lastHit()
Description copied from interface: CacheEntry
when was the entry accessed last time. this information is optional and depends on the implementation, when information is not available -1 is returned

Specified by:
lastHit in interface CacheEntry
Returns:
time in milliseconds since 1/1/1970 GMT
See Also:
CacheEntry.lastHit()

lastModified

public Date lastModified()
Description copied from interface: CacheEntry
when was the entry last time modified. this information is optional and depends on the implementation, when information is not available -1 is returned

Specified by:
lastModified in interface CacheEntry
Returns:
time offset in milliseconds since 1/1/1970 GMT
See Also:
CacheEntry.lastModified()

liveTimeSpan

public long liveTimeSpan()
Description copied from interface: CacheEntry
define time until the entry is valid

Specified by:
liveTimeSpan in interface CacheEntry
Returns:
time offset in milliseconds since 1/1/1970 GMT or Long.MIN_VALUE if value is not defined
See Also:
CacheEntry.liveTimeSpan()

size

public long size()
Description copied from interface: CacheEntry
the size of the object

Specified by:
size in interface CacheEntry
Returns:
size of the object

update

public void update(Object value)

read

public RamCacheEntry read()


Copyright © 2012 Railo