com.beasys.commerce.foundation.cache
Class CacheFactory
java.lang.Object
|
+--com.beasys.commerce.foundation.cache.CacheFactory
- public class CacheFactory
- extends java.lang.Object
Factory to create Singleton Cache objects.
Field Summary |
static java.lang.String |
CAPACITY_SUFFIX
property suffix to describe the cache capacity setting |
static java.lang.String |
ENABLED_SUFFIX
property suffix to describe the cache enabled setting |
static java.lang.String |
TTL_SUFFIX
property suffix to describe the cache time-to-live setting |
Method Summary |
static java.util.Enumeration |
getAllCacheNames()
Returns a list of all Cache objects. |
static Cache |
getCache(java.lang.String name)
Returns a Cache by name. |
static Cache |
getCache(java.lang.String name,
int initialSize,
long itemTtl,
boolean enabled)
Creates a Cache. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TTL_SUFFIX
public static java.lang.String TTL_SUFFIX
- property suffix to describe the cache time-to-live setting
CAPACITY_SUFFIX
public static java.lang.String CAPACITY_SUFFIX
- property suffix to describe the cache capacity setting
ENABLED_SUFFIX
public static java.lang.String ENABLED_SUFFIX
- property suffix to describe the cache enabled setting
CacheFactory
public CacheFactory()
getAllCacheNames
public static java.util.Enumeration getAllCacheNames()
- Returns a list of all Cache objects.
getCache
public static Cache getCache(java.lang.String name,
int initialSize,
long itemTtl,
boolean enabled)
- Creates a Cache. If the cache exists, returns the existing Cache but does not
modify its operation parameters. If any of the cache properties are invalid,
the defaults will be used.
- Parameters:
name
- the name of the cache to retrieveinitialSize
- the initial size of the cacheitemTtl
- the default time-to-live for this cacheenabled
- whether or not this cache is enabled- Returns:
- the cache that was created or retrieved.
getCache
public static Cache getCache(java.lang.String name)
- Returns a Cache by name. Properties for the cache will be retrieved from
the server properties file. If the cache does not already exist, it will
be created; otherwise the pre-existing cache will be returned.
- Parameters:
the
- name of the cache
Copyright © 2001 BEA Systems, Inc. All Rights Reserved