Interface CacheAdminMBean

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String OBJECT_NAME
      A String representing the ObjectName that this MBean maps to.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clearCache​(java.lang.String cacheInstance)
      Clear all the memory and disk entries for the named cache instance.
      java.lang.String[] getAllCacheStatistics()
      Retrieves all of the available cache statistics for the "baseCache" instance.
      java.lang.String[] getAllCacheStatistics​(java.lang.String cacheInstance)
      Retrieves cache statistics specified by the named cache instance.
      java.lang.String getCacheDigest​(java.lang.String cacheInstance, boolean useMemoryCacheDigest, boolean cacheIDOnly, boolean debug)
      Returns an MD5 digest of all the cache entries for the named cache instance.
      java.lang.String getCacheEntry​(java.lang.String cacheInstance, java.lang.String cacheId)
      Retrieves the CacheEntry which holds metadata information for the cache ID.
      java.lang.String[] getCacheIDsInMemory​(java.lang.String cacheInstance, java.lang.String pattern)
      Retrieves all of the cache IDs in memory for the named cache instance that matches the specified regular expression.
      java.lang.String[] getCacheIDsInPushPullTable​(java.lang.String cacheInstance, java.lang.String pattern)
      Retrieves all of the cache IDs in the PushPullTable for the named cache instance that matches the specified regular expression.
      java.lang.String[] getCacheIDsOnDisk​(java.lang.String cacheInstance, java.lang.String pattern)
      Retrieves all of the cache IDs on disk for the named cache instance that matches the specified regular expression.
      java.lang.String[] getCacheInstanceNames()
      Retrieves the names of the available cache instances.
      int getCacheSize()
      Returns the maximum size in entries of the in-memory cache.
      java.lang.String[] getCacheStatisticNames()  
      java.lang.String[] getCacheStatisticNames​(java.lang.String cacheInstance)  
      java.lang.String[] getCacheStatistics​(java.lang.String[] names)  
      java.lang.String[] getCacheStatistics​(java.lang.String cacheInstance, java.lang.String[] names)
      Retrieves cache statistics specified by the names array for the named cache instance.
      boolean getDiskOverflow()
      Indicates whether disk based overflow (disk offload) is enabled.
      int getUsedCacheSize()
      Return the number of used cache entries in the "baseCache" in-memory cache.
      java.lang.String[] invalidateCacheIDs​(java.lang.String cacheInstance, java.lang.String pattern, boolean waitOnInvalidation)
      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.
    • Field Detail

      • OBJECT_NAME

        static final java.lang.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:
        Constant Field Values
    • Method Detail

      • 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

        java.lang.String[] getCacheStatisticNames()
      • getCacheStatisticNames

        java.lang.String[] getCacheStatisticNames​(java.lang.String cacheInstance)
                                           throws javax.management.AttributeNotFoundException
        Throws:
        javax.management.AttributeNotFoundException
      • getCacheInstanceNames

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

        java.lang.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

        java.lang.String[] getAllCacheStatistics​(java.lang.String cacheInstance)
                                          throws javax.management.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:
        javax.management.AttributeNotFoundException
      • getCacheStatistics

        java.lang.String[] getCacheStatistics​(java.lang.String[] names)
                                       throws javax.management.AttributeNotFoundException
        Throws:
        javax.management.AttributeNotFoundException
      • getCacheStatistics

        java.lang.String[] getCacheStatistics​(java.lang.String cacheInstance,
                                              java.lang.String[] names)
                                       throws javax.management.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:
        javax.management.AttributeNotFoundException
      • getCacheIDsInMemory

        java.lang.String[] getCacheIDsInMemory​(java.lang.String cacheInstance,
                                               java.lang.String pattern)
                                        throws javax.management.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:
        javax.management.AttributeNotFoundException
      • getCacheIDsOnDisk

        java.lang.String[] getCacheIDsOnDisk​(java.lang.String cacheInstance,
                                             java.lang.String pattern)
                                      throws javax.management.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:
        javax.management.AttributeNotFoundException
      • getCacheIDsInPushPullTable

        java.lang.String[] getCacheIDsInPushPullTable​(java.lang.String cacheInstance,
                                                      java.lang.String pattern)
                                               throws javax.management.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:
        javax.management.AttributeNotFoundException
      • invalidateCacheIDs

        java.lang.String[] invalidateCacheIDs​(java.lang.String cacheInstance,
                                              java.lang.String pattern,
                                              boolean waitOnInvalidation)
                                       throws javax.management.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:
        javax.management.AttributeNotFoundException
      • getCacheEntry

        java.lang.String getCacheEntry​(java.lang.String cacheInstance,
                                       java.lang.String cacheId)
                                throws javax.management.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:
        javax.management.AttributeNotFoundException
      • clearCache

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

        java.lang.String getCacheDigest​(java.lang.String cacheInstance,
                                        boolean useMemoryCacheDigest,
                                        boolean cacheIDOnly,
                                        boolean debug)
                                 throws javax.management.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:
        javax.management.AttributeNotFoundException