gov.nih.nci.system.dao.cache
Class EVSCacheManager

java.lang.Object
  extended by gov.nih.nci.system.dao.cache.EVSCacheManager

public class EVSCacheManager
extends java.lang.Object

The EVSCacheManger is a singleton that looks for a resources named ehcache_evs.xml. The ehcache_evs.xml provideds information regarding the data that need to be cached.


Method Summary
 java.lang.Object get(java.lang.String key, java.lang.String cacheStoreName)
          Returns the value from the cache for a given key
 java.lang.String getCacheName(java.lang.String name)
          Returns the specified cache name
static EVSCacheManager getInstance()
          Returns an EVSCacheManager instance
 boolean isCacheNameValid(java.lang.String name)
          Returns true if the specified cache name was found
 boolean isKeyValid(java.lang.String cacheStoreName, java.lang.String key)
          Returns true if the specified key was found in the cache
 void put(java.lang.String key, java.lang.Object values, java.lang.String cacheStoreName)
          Stores the specified values in the cache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static EVSCacheManager getInstance()
                                   throws CacheException
Returns an EVSCacheManager instance

Returns:
Throws:
java.lang.Exception
CacheException

getCacheName

public java.lang.String getCacheName(java.lang.String name)
Returns the specified cache name

Parameters:
name -
Returns:

isCacheNameValid

public boolean isCacheNameValid(java.lang.String name)
Returns true if the specified cache name was found

Parameters:
name -
Returns:

isKeyValid

public boolean isKeyValid(java.lang.String cacheStoreName,
                          java.lang.String key)
                   throws CacheException
Returns true if the specified key was found in the cache

Parameters:
name -
Returns:
Throws:
CacheException

put

public void put(java.lang.String key,
                java.lang.Object values,
                java.lang.String cacheStoreName)
         throws CacheException
Stores the specified values in the cache

Parameters:
key -
values -
cacheStoreName -
Throws:
CacheException

get

public java.lang.Object get(java.lang.String key,
                            java.lang.String cacheStoreName)
                     throws CacheException
Returns the value from the cache for a given key

Parameters:
key -
cacheStoreName -
Returns:
Throws:
java.lang.Exception
CacheException


Copyright © 2007 National Cancer Institute (NCI). All Rights Reserved.