Class EhcacheDataRegion

  • All Implemented Interfaces:
    org.hibernate.cache.Region
    Direct Known Subclasses:
    EhcacheQueryResultsRegion, EhcacheTimestampsRegion, EhcacheTransactionalDataRegion

    public abstract class EhcacheDataRegion
    extends java.lang.Object
    implements org.hibernate.cache.Region
    An Ehcache specific data region implementation.

    This class is the ultimate superclass for all Ehcache Hibernate cache regions.

    Author:
    Chris Dennis, Greg Luck, Emmanuel Bernard, Abhishek Sanoujam
    • Method Detail

      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface org.hibernate.cache.Region
      • destroy

        public void destroy()
                     throws org.hibernate.cache.CacheException
        Specified by:
        destroy in interface org.hibernate.cache.Region
        Throws:
        org.hibernate.cache.CacheException
      • getSizeInMemory

        public long getSizeInMemory()
        Specified by:
        getSizeInMemory in interface org.hibernate.cache.Region
      • getElementCountInMemory

        public long getElementCountInMemory()
        Specified by:
        getElementCountInMemory in interface org.hibernate.cache.Region
      • getElementCountOnDisk

        public long getElementCountOnDisk()
        Specified by:
        getElementCountOnDisk in interface org.hibernate.cache.Region
      • toMap

        public java.util.Map toMap()
        Specified by:
        toMap in interface org.hibernate.cache.Region
      • nextTimestamp

        public long nextTimestamp()
        Specified by:
        nextTimestamp in interface org.hibernate.cache.Region
      • getTimeout

        public int getTimeout()
        Specified by:
        getTimeout in interface org.hibernate.cache.Region
      • getEhcache

        public Ehcache getEhcache()
        Return the Ehcache instance backing this Hibernate data region.
      • contains

        public boolean contains​(java.lang.Object key)
        Returns true if this region contains data for the given key.

        This is a Hibernate 3.5 method.

        Specified by:
        contains in interface org.hibernate.cache.Region