com.ibm.wsspi.cache

Class DistributedObjectCacheFactory

  1. java.lang.Object
  2. extended bycom.ibm.wsspi.cache.DistributedObjectCacheFactory

  1. public class DistributedObjectCacheFactory
  2. extends java.lang.Object
This class provides components with factory methods to create/lookup instances of a DistributedObjectCache. Each DistributedObjectCache instance can be configured independently. Use the DistributedObjectCache.getMapType method to determine the map type. The property keys defined below should be used to specify the configuration of the DistributedMap or DistributedNioMap created using this class.
See Also:
DistributedMap, DistributedNioMap

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
KEY_CACHE_SIZE
Property key to specify cache size.
  1. static
  2. java.lang.String
KEY_DISABLE_DEPENDENCY_ID
Property key to disble dependency support.
  1. static
  2. java.lang.String
KEY_DISABLE_TEMPLATES_SUPPORT
Property key to disble template support.
  1. static
  2. java.lang.String
KEY_DISK_CLEANUP_FREQUENCY
Property key to specify the frequency at which the disk cache cleanup daemon should remove expired entries from the disk cache.
  1. static
  2. java.lang.String
KEY_DISK_DELAY_OFFLOAD_DEPID_BUCKETS
Property key to provide a way to limit the buffering of dependency ID information by specifying an upper bound on the number of dependencies that will be buffered in memory.
  1. static
  2. java.lang.String
KEY_DISK_DELAY_OFFLOAD_ENTRIES_LIMIT
Property key to provide a way to limit the buffering of dependency and template information by specify an upper bound on the number of cache entries any specific dependency can contain for buffering in memory.
  1. static
  2. java.lang.String
KEY_DISK_DELAY_OFFLOAD_TEMPLATE_BUCKETS
Property key to provide a way to limit the buffering of template information by specifying an upper bound on the number of templates that will be buffered in memory.
  1. static
  2. java.lang.String
KEY_DISK_OFFLOAD_LOCATION
Property key to specify the disk offload location.
  1. static
  2. java.lang.String
KEY_DISKCACHE_ENTRY_SIZE_MB
Property key to specify the limit of disk cache entry size in MB.
  1. static
  2. java.lang.String
KEY_DISKCACHE_EVICTION_POLICY
Property key to specify the disk cache eviction policy.
  1. static
  2. java.lang.String
KEY_DISKCACHE_HIGH_THRESHOLD
Property key to specify the high threshold in percentage.
  1. static
  2. java.lang.String
KEY_DISKCACHE_LOW_THRESHOLD
Property key to specify the low threshold in percentage.
  1. static
  2. java.lang.String
KEY_DISKCACHE_PERFORMANCE_LEVEL
Property key to specify the disk cache performance level.
  1. static
  2. java.lang.String
KEY_DISKCACHE_SIZE
Property key to specify the limit of disk cache size in entries.
  1. static
  2. java.lang.String
KEY_DISKCACHE_SIZE_GB
Property key to specify the limit of disk cache size in GB.
  1. static
  2. java.lang.String
KEY_ENABLE_CACHE_REPLICATION
Property key to enable cache replication.
  1. static
  2. java.lang.String
KEY_ENABLE_DISK_OFFLOAD
Property key to disble template support.
  1. static
  2. java.lang.String
KEY_ENABLE_NIO_SUPPORT
Property key to enable nio support.
  1. static
  2. java.lang.String
KEY_FLUSH_TO_DISK_ON_STOP
Property key to enable flushing cache contents to disk when the server is stopped.
  1. static
  2. java.lang.String
KEY_LRU_TO_DISK_TRIGGER_PERCENT
Property key to specify the limit of percentage of the memory cache size used as a overflow buffer when disk offload is enabled.
  1. static
  2. java.lang.String
KEY_MEMORY_CACHE_SIZE_HIGH_THRESHOLD
Property key to specify the memory cache size high threshold in percentage.
  1. static
  2. java.lang.String
KEY_MEMORY_CACHE_SIZE_IN_MB
Property key to specify a value for the maximum memory cache size in megabytes (MB).
  1. static
  2. java.lang.String
KEY_MEMORY_CACHE_SIZE_LOW_THRESHOLD
Property key to specify the memory cache low threshold in percentage.
  1. static
  2. java.lang.String
KEY_REPLICATION_DOMAIN
Property key to specify the replication domain.
  1. static
  2. java.lang.String
KEY_USE_LISTENER_CONTEXT
Property key to enable listener context on callbacks.
  1. static
  2. java.lang.String
VALUE_FALSE
Property value for false.
  1. static
  2. java.lang.String
VALUE_TRUE
Property value for true.

Method Summary

Modifier and Type Method and Description
  1. static
  2. com.ibm.websphere.cache.DistributedObjectCache
createDistributedObjectCache(java.lang.String name,java.lang.String nameNonPrefixed,java.util.Properties properties)
  1. static
  2. com.ibm.websphere.cache.DistributedObjectCache
getMap(java.lang.String name)
Returns the DistributedMap instance specified by the given id.
  1. static
  2. com.ibm.websphere.cache.DistributedObjectCache
getMap(java.lang.String name,java.util.Properties properties)
Returns the DistributedMap or DistributedNioMap instance specified by the given id, using the the parameters specified in properties.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

KEY_CACHE_SIZE

  1. public static final java.lang.String KEY_CACHE_SIZE
Property key to specify cache size. Value is string int
Since:
v6.0
See Also:

KEY_DISABLE_DEPENDENCY_ID

  1. public static final java.lang.String KEY_DISABLE_DEPENDENCY_ID
Property key to disble dependency support. Value is VALUE_TRUE or VALUE_FALSE
Since:
v6.0
See Also:

KEY_DISABLE_TEMPLATES_SUPPORT

  1. public static final java.lang.String KEY_DISABLE_TEMPLATES_SUPPORT
Property key to disble template support. Value is VALUE_TRUE or VALUE_FALSE
Since:
v6.0
See Also:

KEY_ENABLE_DISK_OFFLOAD

  1. public static final java.lang.String KEY_ENABLE_DISK_OFFLOAD
Property key to disble template support. Value is VALUE_TRUE or VALUE_FALSE
Since:
v6.0
See Also:

KEY_ENABLE_NIO_SUPPORT

  1. public static final java.lang.String KEY_ENABLE_NIO_SUPPORT
Property key to enable nio support. Value is VALUE_TRUE or VALUE_FALSE
Since:
v6.0
See Also:
DistributedNioMap, Constant Field Values

KEY_DISK_OFFLOAD_LOCATION

  1. public static final java.lang.String KEY_DISK_OFFLOAD_LOCATION
Property key to specify the disk offload location. Value is string path
Since:
v6.0
See Also:

KEY_USE_LISTENER_CONTEXT

  1. public static final java.lang.String KEY_USE_LISTENER_CONTEXT
Property key to enable listener context on callbacks. Value is VALUE_TRUE or VALUE_FALSE
Since:
v6.0
See Also:

KEY_FLUSH_TO_DISK_ON_STOP

  1. public static final java.lang.String KEY_FLUSH_TO_DISK_ON_STOP
Property key to enable flushing cache contents to disk when the server is stopped. This property is ignored if disk offload is disabled. Value is VALUE_TRUE or VALUE_FALSE
Since:
v6.0
See Also:

KEY_ENABLE_CACHE_REPLICATION

  1. public static final java.lang.String KEY_ENABLE_CACHE_REPLICATION
Property key to enable cache replication. Value is VALUE_TRUE or VALUE_FALSE
Since:
v6.0
See Also:

KEY_REPLICATION_DOMAIN

  1. public static final java.lang.String KEY_REPLICATION_DOMAIN
Property key to specify the replication domain. Value is string domain name.
Since:
v6.0
See Also:

KEY_DISKCACHE_PERFORMANCE_LEVEL

  1. public static final java.lang.String KEY_DISKCACHE_PERFORMANCE_LEVEL
Property key to specify the disk cache performance level. Value: 0 - Low Performance and low memory usage; Value: 1 - Balanced Performance and balanced memory usage (default); Value: 2 - Custom Performance and custom memory usage; Value: 3 - High Performance and high memory usage;
Since:
v6.1
See Also:

KEY_DISK_CLEANUP_FREQUENCY

  1. public static final java.lang.String KEY_DISK_CLEANUP_FREQUENCY
Property key to specify the frequency at which the disk cache cleanup daemon should remove expired entries from the disk cache. Value: positive value in minutes; default = 0 (cleanup is scheduled to run at midnight).
Since:
v6.0
See Also:

KEY_DISK_DELAY_OFFLOAD_ENTRIES_LIMIT

  1. public static final java.lang.String KEY_DISK_DELAY_OFFLOAD_ENTRIES_LIMIT
Property key to provide a way to limit the buffering of dependency and template information by specify an upper bound on the number of cache entries any specific dependency can contain for buffering in memory. If there are more entries per dependency than this limit, the dependency/template information is written to disk. Value: positive value; default = 1000;
Since:
v6.0
See Also:

KEY_DISK_DELAY_OFFLOAD_DEPID_BUCKETS

  1. public static final java.lang.String KEY_DISK_DELAY_OFFLOAD_DEPID_BUCKETS
Property key to provide a way to limit the buffering of dependency ID information by specifying an upper bound on the number of dependencies that will be buffered in memory. If the count of dependencies exceeds this limit, the excess will be written to disk. Value: positive value; default = 1000;
Since:
v6.0
See Also:

KEY_DISK_DELAY_OFFLOAD_TEMPLATE_BUCKETS

  1. public static final java.lang.String KEY_DISK_DELAY_OFFLOAD_TEMPLATE_BUCKETS
Property key to provide a way to limit the buffering of template information by specifying an upper bound on the number of templates that will be buffered in memory. If the count of templates exceeds this limit, the excess will be written to disk. Value: positive value; default = 1000;
Since:
v6.0
See Also:

KEY_DISKCACHE_EVICTION_POLICY

  1. public static final java.lang.String KEY_DISKCACHE_EVICTION_POLICY
Property key to specify the disk cache eviction policy. Value: 0 (none) - eviction algorithm disabled (default); Value: 1 (random) - The expired objects are removed first. If the disk size has not reached the low threshold limit, objects are picked from disk cache in random order until the disk cache size has reached. Value: 2 (size based) - The expired objects are removed first. If the disk size has not reached the low threshold limit, largest-sized objects are removed until the disk cache size has reached
Since:
v6.1
See Also:

KEY_DISKCACHE_HIGH_THRESHOLD

  1. public static final java.lang.String KEY_DISKCACHE_HIGH_THRESHOLD
Property key to specify the high threshold in percentage. It is used to start evicting objects out of disk cache when one or both of the high thresholds is reached Value: 0 - 100
Since:
v6.1
See Also:

KEY_DISKCACHE_LOW_THRESHOLD

  1. public static final java.lang.String KEY_DISKCACHE_LOW_THRESHOLD
Property key to specify the low threshold in percentage. It is used to bring down the disk cache till the low threshold is reached. Value: 0 - 100
Since:
v6.1
See Also:

KEY_DISKCACHE_SIZE

  1. public static final java.lang.String KEY_DISKCACHE_SIZE
Property key to specify the limit of disk cache size in entries. Value: positive integer; default 0 means no limit
Since:
v6.1
See Also:

KEY_DISKCACHE_SIZE_GB

  1. public static final java.lang.String KEY_DISKCACHE_SIZE_GB
Property key to specify the limit of disk cache size in GB. Value: positive integer; default 0 means no limit
Since:
v6.1
See Also:

KEY_DISKCACHE_ENTRY_SIZE_MB

  1. public static final java.lang.String KEY_DISKCACHE_ENTRY_SIZE_MB
Property key to specify the limit of disk cache entry size in MB. Value: positive integer; default 0 means no limit
Since:
v6.1
See Also:

KEY_LRU_TO_DISK_TRIGGER_PERCENT

  1. public static final java.lang.String KEY_LRU_TO_DISK_TRIGGER_PERCENT
Property key to specify the limit of percentage of the memory cache size used as a overflow buffer when disk offload is enabled. Value: 0 - 100; default 0 means no overflow
Since:
v6.1
See Also:

KEY_MEMORY_CACHE_SIZE_IN_MB

  1. public static final java.lang.String KEY_MEMORY_CACHE_SIZE_IN_MB
Property key to specify a value for the maximum memory cache size in megabytes (MB). Value: positive integer; default: -1 means no limit on memory cache size
Since:
v7.0
See Also:

KEY_MEMORY_CACHE_SIZE_HIGH_THRESHOLD

  1. public static final java.lang.String KEY_MEMORY_CACHE_SIZE_HIGH_THRESHOLD
Property key to specify the memory cache size high threshold in percentage. It is used to start evicting objects out of memory cache until the high threshold is reached Value: 0 - 100 (default: 95)
Since:
v7.0
See Also:

KEY_MEMORY_CACHE_SIZE_LOW_THRESHOLD

  1. public static final java.lang.String KEY_MEMORY_CACHE_SIZE_LOW_THRESHOLD
Property key to specify the memory cache low threshold in percentage. It is used to prune the memory cache until the low threshold is reached. Value: 0 - 100 (default: 80)
Since:
v7.0
See Also:

VALUE_TRUE

  1. public static final java.lang.String VALUE_TRUE
Property value for true.
Since:
v6.0
See Also:

VALUE_FALSE

  1. public static final java.lang.String VALUE_FALSE
Property value for false.
Since:
v6.0
See Also:

Method Detail

getMap

  1. public static com.ibm.websphere.cache.DistributedObjectCache getMap( java.lang.String name)
Returns the DistributedMap instance specified by the given id. If the given instance has not yet been created, then a new instance is created using the default parameters.
Parameters:
name - instance name
Returns:
A DistributedMap instance
See Also:

getMap

  1. public static com.ibm.websphere.cache.DistributedObjectCache getMap( java.lang.String name,
  2. java.util.Properties properties)
Returns the DistributedMap or DistributedNioMap instance specified by the given id, using the the parameters specified in properties. If the given instance has not yet been created, then a new instance is created using the parameters specified in the properties object. Use the various KEY_xxx and VALUE_xxx constants to populate the passed properties object.
Parameters:
name - instance name
properties -
Returns:
A DistributedObjectCache instance

createDistributedObjectCache

  1. public static com.ibm.websphere.cache.DistributedObjectCache createDistributedObjectCache( java.lang.String name,
  2. java.lang.String nameNonPrefixed,
  3. java.util.Properties properties)