Interface CacheAdminMBean


public interface CacheAdminMBean
The CacheAdmin MBean defines the management interface to retrieve usage statistics for a server's DynaCache (also known as the Distributed Map).

The ObjectName for this MBean is "WebSphere:feature=CacheAdmin,type=DynaCache,name=DistributedMap".

  • Field Details

    • OBJECT_NAME

      static final String OBJECT_NAME
      A String representing the ObjectName that this MBean maps to. See also the @Component property. Note that in many (most?) cases users will want to reference this as "Websphere:type=DynaCache,*", which will also work with Traditional WAS (which uses a related but different object name)
      See Also:
  • Method Details

    • getCacheSize

      int getCacheSize()
      Returns the maximum size in entries of the in-memory cache.
    • getUsedCacheSize

      int getUsedCacheSize()
      Return the number of used cache entries in the "baseCache" in-memory cache.
      Returns:
      The number of used cache entries in the "baseCache" in-memory cache.
    • getDiskOverflow

      boolean getDiskOverflow()
      Indicates whether disk based overflow (disk offload) is enabled.
      Returns:
      true if the disk based overflow (disk offload) is enabled.
    • getCacheStatisticNames

      String[] getCacheStatisticNames()
    • getCacheStatisticNames

      String[] getCacheStatisticNames(String cacheInstance) throws AttributeNotFoundException
      Throws:
      AttributeNotFoundException
    • getCacheInstanceNames

      String[] getCacheInstanceNames()
      Retrieves the names of the available cache instances.
      Returns:
      the names of the available cache instances.
    • getAllCacheStatistics

      String[] getAllCacheStatistics()
      Retrieves all of the available cache statistics for the "baseCache" instance.
      Returns:
      all of the available cache statistics for the "baseCache" instance.
    • getAllCacheStatistics

      String[] getAllCacheStatistics(String cacheInstance) throws AttributeNotFoundException
      Retrieves cache statistics specified by the named cache instance.
      Parameters:
      cacheInstance - The name of the cache instance.
      Returns:
      The all statistics list of the named cache instance
      Throws:
      AttributeNotFoundException
    • getCacheStatistics

      String[] getCacheStatistics(String[] names) throws AttributeNotFoundException
      Throws:
      AttributeNotFoundException
    • getCacheStatistics

      String[] getCacheStatistics(String cacheInstance, String[] names) throws AttributeNotFoundException
      Retrieves cache statistics specified by the names array for the named cache instance.
      Parameters:
      cacheInstance - The name of the cache instance.
      names - The array of cache statistic names
      Returns:
      The statistics list of the names array
      Throws:
      AttributeNotFoundException
    • getCacheIDsInMemory

      String[] getCacheIDsInMemory(String cacheInstance, String pattern) throws AttributeNotFoundException
      Retrieves all of the cache IDs in memory for the named cache instance that matches the specified regular expression. The java.util.regex libraries are for matching. The find() method locates the matching IDs.
      Parameters:
      cacheInstance - The name of the cache instance.
      pattern - A regular expression that is specified as a string.
      Returns:
      The list of cache IDs mapped to the pattern
      Throws:
      AttributeNotFoundException
    • getCacheIDsOnDisk

      String[] getCacheIDsOnDisk(String cacheInstance, String pattern) throws AttributeNotFoundException
      Retrieves all of the cache IDs on disk for the named cache instance that matches the specified regular expression. The java.util.regex libraries are for matching. The find() method locates the matching IDs. This operation can take a non-deterministic amount of time to complete in some extreme cases.
      Parameters:
      cacheInstance - The name of the cache instance.
      pattern - A regular expression that is specified as a string.
      Returns:
      The list of cache IDs mapped to the pattern
      Throws:
      AttributeNotFoundException
    • getCacheIDsInPushPullTable

      String[] getCacheIDsInPushPullTable(String cacheInstance, String pattern) throws AttributeNotFoundException
      Retrieves all of the cache IDs in the PushPullTable for the named cache instance that matches the specified regular expression. The java.util.regex libraries are for matching. The find() method locates the matching IDs.
      Parameters:
      cacheInstance - The name of the cache instance.
      pattern - A regular expression that is specified as a string.
      Returns:
      The list of cache IDs mapped to the pattern
      Throws:
      AttributeNotFoundException
    • invalidateCacheIDs

      String[] invalidateCacheIDs(String cacheInstance, String pattern, boolean waitOnInvalidation) throws AttributeNotFoundException
      Invalidates all cache entries that match the pattern mapped cache IDs in the named cache instance and all cache entries dependent upon the matched entries in the instance. Returns the list of cache IDs mapped to the pattern. Dependent cache entries invalidated are not in the list. Matched entries are invalidated in the memory cache and disk cache. To clear a cache,* invoke invalidateCacheIDs with a pattern = *. In this case, a list with only the element * is returned.
      Parameters:
      cacheInstance - The name of the cache instance.
      pattern - A regular expression that is specified as a string.
      waitOnInvalidation - True indicates that this method should not return until the invalidations have taken effect. False indicates that the invalidations will be queued for later batch processing. For waitOnInvalidation = true, this method will take a long time to return and potentially could lock the cache and reduce throughput. If waitOnInvalidation = false, this method returns almost immediately, and the invalidates are handled on a separate thread.
      Returns:
      The list of cache IDs mapped to the pattern
      Throws:
      AttributeNotFoundException
    • getCacheEntry

      String getCacheEntry(String cacheInstance, String cacheId) throws AttributeNotFoundException
      Retrieves the CacheEntry which holds metadata information for the cache ID. Returns null if the CacheEntry is not found. If the entry is found, the following information is returned: Cache ID User metadata, Priority, Time To Live indicator (TTL), Inactivity, ExpirationTime, Sharing Policy, value Size, value hashcode, A boolean that indicate whether or not the entry exists on disk. A boolean that indicates whether the cache entry skipped memory and was written directly to disk cache. Template IDs, Dependency IDs, Alias IDs
      Parameters:
      cacheInstance - The name of the cache instance.
      cacheId - The name of cache ID
      Returns:
      cache entry
      Throws:
      AttributeNotFoundException
    • clearCache

      void clearCache(String cacheInstance) throws AttributeNotFoundException
      Clear all the memory and disk entries for the named cache instance.
      Parameters:
      cacheInstance - The name of the cache instance.
      Throws:
      AttributeNotFoundException
    • getCacheDigest

      String getCacheDigest(String cacheInstance, boolean useMemoryCacheDigest, boolean cacheIDOnly, boolean debug) throws AttributeNotFoundException
      Returns an MD5 digest of all the cache entries for the named cache instance. Note that the cache key and value objects should override the default java.lang.Object.hashCode() method to get semantic comparability between object instances. This is a CPU and I/O intensive when the useMemoryCacheDigest parameter is set to false. In this case the command will compute a hash of the cached objects on disk.
      Parameters:
      cacheInstance - The name of the cache instance.
      useMemoryCacheDigest - If true, use only the memory cache digest. If false, use the whole cache digest.
      cacheIDOnly - If true, get cache ID digest. It also includes ID digest from the PushPullTable. If false, get cache ID/value digest.
      debug - If debug is true, a list of the cache IDs and their hashcodes are written to the SystemOut log.
      Returns:
      MD5 digest of all the cache entries in memory/disk for the named cache instance.
      Throws:
      AttributeNotFoundException