Class Cache

  • All Implemented Interfaces:
    java.io.Serializable, CacheMBean

    public class Cache
    extends java.lang.Object
    implements CacheMBean, java.io.Serializable
    A Cache implementation that supports JMX MBeans
    Since:
    1.3
    Version:
    $Id$
    Author:
    Greg Luck
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Cache​(Ehcache cache)
      A constructor for JCache.
    • Method Detail

      • flush

        public void flush()
                   throws java.lang.IllegalStateException,
                          CacheException
        Flushes all cache items from memory to the disk store, and from the DiskStore to disk.
        Specified by:
        flush in interface CacheMBean
        Throws:
        java.lang.IllegalStateException - if the cache is not Status.STATUS_ALIVE
        CacheException
      • getStatus

        public java.lang.String getStatus()
        Gets the status attribute of the Cache.
        Specified by:
        getStatus in interface CacheMBean
        Returns:
        The status value as a String from the Status enum class
      • getName

        public java.lang.String getName()
        Gets the cache name.
        Specified by:
        getName in interface CacheMBean
      • isTerracottaClustered

        public boolean isTerracottaClustered()
        Is the cache configured with Terracotta clustering?
        Specified by:
        isTerracottaClustered in interface CacheMBean
      • hasAbortedSizeOf

        public boolean hasAbortedSizeOf()
        May the cache contain elements which the SizeOf engine could not fully size?
        Specified by:
        hasAbortedSizeOf in interface CacheMBean