com.ibm.wsspi.cache

Interface CacheConfig


  1. public interface CacheConfig
This interface is used to provide the cache instance configuration to a cache provider. This configuration is provided to the CacheProvider via the CacheProvider.createCache(CacheConfig) method.
Since:
WAS 6.1.0.27

Nested Class Summary

Modifier and Type Interface and Description
  1. static class
CacheConfig.EvictorAlgorithmType
Eviction algorithm type EvictorAlgorithmType.LRUEvictor is defined as an evictor type that uses a least recently used algorithm to decide which entries to evict when the cache entries map exceeds a maximum number of entries.

Method Summary

Modifier and Type Method and Description
  1. java.lang.String
getCacheName()
Returns the name of cache instance.
  1. CacheConfig.EvictorAlgorithmType
getEvictorAlgorithmType()
Returns the type of evictor algorithm.
  1. int
getHighThresholdCacheSizeInMB()
Returns the high threshold in percentage of JVM heap space that can be occupied by the cache entries.
  1. int
getLowThresholdCacheSizeInMB()
Returns the low threshold in percentage of JVM heap space that can be occupied by the cache entries.
  1. long
getMaxCacheSize()
Returns the maximum number of cache entries allowed in the memory.
  1. long
getMaxCacheSizeInMB()
Returns the maximum space on the JVM heap that can be occupied by the cache entries.
  1. java.util.Map<java.lang.String,java.lang.String>
getProperties()
Returns additional properties configured for the cacheinstance via the WebSphere admin console, wsadmin, the cacheinstances.properties file or the DistributedObjectCacheFactory.getMap(String name, Properties properties) API.
  1. boolean
isDistributed()
Indicates if this cache is meant to be distributed across the server instances of the cache provider.

Method Detail

getCacheName

  1. java.lang.String getCacheName()
Returns the name of cache instance.
Returns:
Name of cache instance.

getMaxCacheSize

  1. long getMaxCacheSize()
Returns the maximum number of cache entries allowed in the memory.
Returns:
The maximum number of cache entries allowed.

getMaxCacheSizeInMB

  1. long getMaxCacheSizeInMB()
Returns the maximum space on the JVM heap that can be occupied by the cache entries.
Returns:
The maximum size of cache allowed in terms of JVM heap.

getHighThresholdCacheSizeInMB

  1. int getHighThresholdCacheSizeInMB( )
Returns the high threshold in percentage of JVM heap space that can be occupied by the cache entries.
Returns:
The high threshold of JVM heap space that can be occupied by the cache entries

getLowThresholdCacheSizeInMB

  1. int getLowThresholdCacheSizeInMB( )
Returns the low threshold in percentage of JVM heap space that can be occupied by the cache entries.
Returns:
The low threshold of JVM heap space that can be occupied by the cache entries

getEvictorAlgorithmType

  1. CacheConfig.EvictorAlgorithmType getEvictorAlgorithmType( )
Returns the type of evictor algorithm.
Returns:
The type of evictor algorithm.
See Also:

isDistributed

  1. boolean isDistributed()
Indicates if this cache is meant to be distributed across the server instances of the cache provider.
Returns:
true - Replication is enabled for this cache instance configuration

getProperties

  1. java.util.Map<java.lang.String,java.lang.String> getProperties( )
Returns additional properties configured for the cacheinstance via the WebSphere admin console, wsadmin, the cacheinstances.properties file or the DistributedObjectCacheFactory.getMap(String name, Properties properties) API.
Returns:
additional properties used for configuring the cache provider's cache instance