railo.runtime.cache.eh.remote
Class EHCacheRemote

java.lang.Object
  extended by railo.runtime.cache.CacheSupport
      extended by railo.runtime.cache.eh.remote.EHCacheRemote
All Implemented Interfaces:
Cache

public class EHCacheRemote
extends CacheSupport


Constructor Summary
EHCacheRemote()
           
 
Method Summary
 boolean contains(String key)
          check if there is a entry inside the cache that match the given key
 CacheEntry getCacheEntry(String key)
          return cache entry that match the key, throws a CacheException when entry does not exist or is stale
 CacheEntry getCacheEntry(String key, CacheEntry defaultValue)
          return cache entry that match the key or the defaultValue when entry does not exist
 Struct getCustomInfo()
          get all information data available for this cache
 CacheEntry getQuiet(String key)
           
 CacheEntry getQuiet(String key, CacheEntry defaultValue)
           
 long hitCount()
          how many time was the cache accessed? this information is optional and depends on the implementation, when information is not available -1 is returned
 void init(Config config, String name, Struct arguments)
          initialize the cache
static void init(ConfigWeb config, String[] cacheNames, Struct[] arguments)
           
 List keys()
          Returns a List of the keys contained in this cache.
 long missCount()
          how many time was the cache accessed for a record that does not exist? this information is optional and depends on the implementation, when information is not available -1 is returned
 void put(String key, Object value, Long idleTime, Long liveTime)
          puts a cache entry to the cache, overwrite existing entries that already exists inside the cache with the same key
 boolean remove(String key)
          remove entry that match this key
 
Methods inherited from class railo.runtime.cache.CacheSupport
entries, entries, entries, getValue, getValue, keys, keys, remove, remove, values, values, values
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EHCacheRemote

public EHCacheRemote()
Method Detail

init

public static void init(ConfigWeb config,
                        String[] cacheNames,
                        Struct[] arguments)

init

public void init(Config config,
                 String name,
                 Struct arguments)
          throws IOException
Description copied from interface: Cache
initialize the cache

arguments - configuration arguments
Throws:
CacheException
IOException

contains

public boolean contains(String key)
Description copied from interface: Cache
check if there is a entry inside the cache that match the given key

Returns:
contains a value that match this key

keys

public List keys()
Description copied from interface: Cache
Returns a List of the keys contained in this cache. The set is NOT backed by the cache, so changes to the cache are NOT reflected in the set, and vice-versa.

Returns:
a set of the keys contained in this cache.

getQuiet

public CacheEntry getQuiet(String key)
                    throws IOException
Overrides:
getQuiet in class CacheSupport
Throws:
IOException

getQuiet

public CacheEntry getQuiet(String key,
                           CacheEntry defaultValue)
Specified by:
getQuiet in class CacheSupport

getCacheEntry

public CacheEntry getCacheEntry(String key)
                         throws IOException
Description copied from interface: Cache
return cache entry that match the key, throws a CacheException when entry does not exist or is stale

Specified by:
getCacheEntry in interface Cache
Overrides:
getCacheEntry in class CacheSupport
Parameters:
key - key of the cache entry to get
Returns:
cache entry
Throws:
CacheException
IOException

getCacheEntry

public CacheEntry getCacheEntry(String key,
                                CacheEntry defaultValue)
Description copied from interface: Cache
return cache entry that match the key or the defaultValue when entry does not exist

Parameters:
key - key of the cache entry to get
Returns:
cache entry

getCustomInfo

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

Specified by:
getCustomInfo in interface Cache
Overrides:
getCustomInfo in class CacheSupport

hitCount

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

Returns:
access count

missCount

public long missCount()
Description copied from interface: Cache
how many time was the cache accessed for a record that does not exist? this information is optional and depends on the implementation, when information is not available -1 is returned

Returns:
access count

put

public void put(String key,
                Object value,
                Long idleTime,
                Long liveTime)
Description copied from interface: Cache
puts a cache entry to the cache, overwrite existing entries that already exists inside the cache with the same key


remove

public boolean remove(String key)
Description copied from interface: Cache
remove entry that match this key

Returns:
returns if there was a removal


Copyright © 2012 Railo