railo.runtime.cache.eh
Class EHCacheLite

java.lang.Object
  extended by railo.runtime.cache.CacheSupport
      extended by railo.runtime.cache.eh.EHCacheSupport
          extended by railo.runtime.cache.eh.EHCacheLite
All Implemented Interfaces:
Cache, CacheEvent

public class EHCacheLite
extends EHCacheSupport


Field Summary
 
Fields inherited from interface railo.commons.io.cache.Cache
DEFAULT_CACHE_NAME
 
Constructor Summary
EHCacheLite()
           
 
Method Summary
static void flushAllCaches()
           
 CacheEntry getCacheEntry(String key)
          return cache entry that match the key, throws a CacheException when entry does not exists or is stale
 CacheEntry getCacheEntry(String key, CacheEntry defaultValue)
          return cache entry that match the key or the defaultValue when entry does not exist
 Object getValue(String key)
          return value that match the key, throws a CacheException when entry does not exists or is stale
 Object getValue(String key, Object defaultValue)
          return value that match the key or the defaultValue when entry does not exist
 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
static void init(Config config, String[] cacheNames, Struct[] arguments)
           
 void init(Config config, String cacheName, Struct arguments)
           
 void init(String cacheName, Struct arguments)
          initialize the 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 remove()
           
 boolean remove(String key)
          remove entry that match this key
 
Methods inherited from class railo.runtime.cache.eh.EHCacheSupport
contains, getCustomInfo, getQuiet, getQuiet, keys, put, register
 
Methods inherited from class railo.runtime.cache.CacheSupport
entries, entries, entries, keys, keys, remove, remove, values, values, values
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface railo.commons.io.cache.Cache
entries, entries, entries, keys, keys, remove, remove, values, values, values
 

Constructor Detail

EHCacheLite

public EHCacheLite()
Method Detail

init

public static void init(Config config,
                        String[] cacheNames,
                        Struct[] arguments)
                 throws IOException
Throws:
IOException

flushAllCaches

public static void flushAllCaches()

init

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

Parameters:
cacheName -
arguments - configuration arguments
Throws:
IOException
See Also:
railo.commons.io.cache.Cache#init(railo.runtime.type.Struct)

init

public void init(Config config,
                 String cacheName,
                 Struct arguments)

remove

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

Returns:
returns if there was a removal
See Also:
Cache.remove(String)

getCacheEntry

public CacheEntry getCacheEntry(String key)
                         throws CacheException
Description copied from interface: Cache
return cache entry that match the key, throws a CacheException when entry does not exists 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
See Also:
Cache.getCacheEntry(java.lang.String)

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

getValue

public Object getValue(String key)
                throws CacheException
Description copied from interface: Cache
return value that match the key, throws a CacheException when entry does not exists or is stale

Specified by:
getValue in interface Cache
Overrides:
getValue in class CacheSupport
Parameters:
key - key of the value to get
Returns:
value
Throws:
CacheException
See Also:
Cache.getValue(String)

getValue

public Object getValue(String key,
                       Object defaultValue)
Description copied from interface: Cache
return value that match the key or the defaultValue when entry does not exist

Specified by:
getValue in interface Cache
Overrides:
getValue in class CacheSupport
Parameters:
key - key of the value to get
Returns:
value
See Also:
Cache.getValue(String, java.lang.Object)

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
See Also:
Cache.hitCount()

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
See Also:
Cache.missCount()

remove

public void remove()


Copyright © 2012 Railo