com.ibm.websphere.cache
Class DynamicCacheAccessor
- java.lang.Object
-
- com.ibm.websphere.cache.DynamicCacheAccessor
-
public final class DynamicCacheAccessor extends java.lang.ObjectThis class provides applications with access to the Dynamic Cache, allowing programmatic inspection and manipulation of WebSphere's cache.
-
-
Constructor Summary
Constructors Constructor and Description DynamicCacheAccessor()
-
Method Summary
Methods Modifier and Type Method and Description static CachegetCache()Deprecated.Use DistributedMap to store and manage objects in cache. DynamicCacheAccessor#getDistributedMap will return a DistributedMap for accessing base cache.static DistributedMapgetDistributedMap()Deprecated.baseCache is used for servlet caching. It should not be used as a DistributedMap.static DistributedNioMapgetProxyCacheInstance(java.lang.String name)This method will return a DistributedObjectCache reference to a Proxy Server or On Demand Router's cache instance.static CachegetServletCache()This obtains a reference to the dynamic cache.static ServletCachegetServletCacheInstance(java.lang.String name)This method will return a ServletCache reference to a servlet cache.static booleanisCachingEnabled()This determines if Dynamic caching (either servlet or object cache) is enabled.static booleanisObjectCachingEnabled()This determines if Dynamic object caching is enabled.static booleanisServletCachingEnabled()This determines if Dynamic servlet caching is enabled.
-
-
-
Method Detail
-
getCache
public static Cache getCache()
Deprecated. Use DistributedMap to store and manage objects in cache. DynamicCacheAccessor#getDistributedMap will return a DistributedMap for accessing base cache.This obtains a reference to the dynamic cache.- Returns:
- Reference to the cache or null if caching is disabled
- See Also:
getDistributedMap(),DistributedMap
-
getServletCache
public static Cache getServletCache()
This obtains a reference to the dynamic cache.- Returns:
- Reference to the cache or null if caching is disabled
- See Also:
getDistributedMap(),DistributedMap
-
isCachingEnabled
public static boolean isCachingEnabled()
This determines if Dynamic caching (either servlet or object cache) is enabled.- Returns:
- true if caching is enabled, false if it is disabled.
-
isServletCachingEnabled
public static boolean isServletCachingEnabled()
This determines if Dynamic servlet caching is enabled.- Returns:
- true if caching is enabled, false if it is disabled.
-
isObjectCachingEnabled
public static boolean isObjectCachingEnabled()
This determines if Dynamic object caching is enabled.- Returns:
- true if caching is enabled, false if it is disabled.
-
getDistributedMap
public static DistributedMap getDistributedMap()
Deprecated. baseCache is used for servlet caching. It should not be used as a DistributedMap.This method will return a DistributedMap reference to the dynamic cache.- Returns:
- Reference to the DistributedMap or null if caching is disabled.
- Since:
- v6.0
-
getProxyCacheInstance
public static DistributedNioMap getProxyCacheInstance(java.lang.String name)
This method will return a DistributedObjectCache reference to a Proxy Server or On Demand Router's cache instance.- Parameters:
name- The in-memory name of the proxy's cache instance- Returns:
- Reference to the Proxy's cache instance. Null if instance is not found or if we are not in a Proxy Server
-
getServletCacheInstance
public static ServletCache getServletCacheInstance(java.lang.String name)
This method will return a ServletCache reference to a servlet cache.- Parameters:
name- The jndi name of the servlet cache instance.- Returns:
- Reference to a servlet cache instance. Null if instance is not found or if servlet caching is not enabled.
-
-