com.bankframe.services.cache
Class CacheFactory

java.lang.Object
  extended bycom.bankframe.services.cache.CacheFactory

public class CacheFactory
extends java.lang.Object

This is a factory class that will create a com.bankframe.services.cache.Cache instance on demand based on the properties specified in the BankframeResource.properties file.

Author:
Engineering

Constructor Summary
CacheFactory()
           
 
Method Summary
static Cache createCache(java.lang.String cacheName)
          This method creates a cache instance based on settings specified in the BankframeResource.properties file.
static Cache getCache(java.util.Map map, java.lang.String cacheName)
          Deprecated. Use getCache(String name) instead
static Cache getCache(java.lang.String cacheName)
          This method gets an instance of a cache object.
static java.util.Map getCaches()
           
static void registerCache(java.lang.String cacheName, Cache cache)
          This registers a cache in the list of caches with the specified name
static void removeCache(java.lang.String cacheName)
          This method removes the specified cache from the system and removes all entries in the cache.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheFactory

public CacheFactory()
Method Detail

getCaches

public static java.util.Map getCaches()

createCache

public static Cache createCache(java.lang.String cacheName)
This method creates a cache instance based on settings specified in the BankframeResource.properties file. This method looks for a set of settings begging with cache.cacheName where cacheName is the name of the cache.

Parameters:
cacheName -
Returns:

getCache

public static Cache getCache(java.lang.String cacheName)
This method gets an instance of a cache object. This method configures the cache based on settings specified in the BankframeResource.properties file

Parameters:
cacheName - the name of this cache. This is used to distinguish distributed caches from each other.
Returns:
A cache object

registerCache

public static void registerCache(java.lang.String cacheName,
                                 Cache cache)
This registers a cache in the list of caches with the specified name


removeCache

public static void removeCache(java.lang.String cacheName)
This method removes the specified cache from the system and removes all entries in the cache.

Parameters:
cacheName -

getCache

public static Cache getCache(java.util.Map map,
                             java.lang.String cacheName)
Deprecated. Use getCache(String name) instead

This method gets an instance of a cache described in the properties file backed by a given persistent map. This method will look for the cache.distributed key in the BankFrameResource.properties file to determine if the returned cache object is distributed If the cache is distributed then the calling class should change the name of the distribued cache to ensure that it does not join the default cache

Parameters:
map - a Map object that is used as a persistent backing
cacheName - the name of this cache. This is used to distinguish distributed caches from each other
Returns:
A cache object


Copyright © 2004 Siebel Systems, Inc. All rights reserved.