Package net.sf.ehcache.hibernate.regions
Class EhcacheDataRegion
- java.lang.Object
-
- net.sf.ehcache.hibernate.regions.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.RegionAn 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
-
-
Field Summary
Fields Modifier and Type Field Description protected EhcacheAccessStrategyFactoryaccessStrategyFactoryTheEhcacheAccessStrategyFactoryused for creating various access strategiesprotected EhcachecacheEhcache instance backing this Hibernate data region.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(java.lang.Object key)Returnstrueif this region contains data for the given key.voiddestroy()EhcachegetEhcache()Return the Ehcache instance backing this Hibernate data region.longgetElementCountInMemory()longgetElementCountOnDisk()java.lang.StringgetName()longgetSizeInMemory()intgetTimeout()longnextTimestamp()java.util.MaptoMap()
-
-
-
Field Detail
-
cache
protected final Ehcache cache
Ehcache instance backing this Hibernate data region.
-
accessStrategyFactory
protected final EhcacheAccessStrategyFactory accessStrategyFactory
TheEhcacheAccessStrategyFactoryused for creating various access strategies
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceorg.hibernate.cache.Region
-
destroy
public void destroy() throws org.hibernate.cache.CacheException- Specified by:
destroyin interfaceorg.hibernate.cache.Region- Throws:
org.hibernate.cache.CacheException
-
getSizeInMemory
public long getSizeInMemory()
- Specified by:
getSizeInMemoryin interfaceorg.hibernate.cache.Region
-
getElementCountInMemory
public long getElementCountInMemory()
- Specified by:
getElementCountInMemoryin interfaceorg.hibernate.cache.Region
-
getElementCountOnDisk
public long getElementCountOnDisk()
- Specified by:
getElementCountOnDiskin interfaceorg.hibernate.cache.Region
-
toMap
public java.util.Map toMap()
- Specified by:
toMapin interfaceorg.hibernate.cache.Region
-
nextTimestamp
public long nextTimestamp()
- Specified by:
nextTimestampin interfaceorg.hibernate.cache.Region
-
getTimeout
public int getTimeout()
- Specified by:
getTimeoutin interfaceorg.hibernate.cache.Region
-
getEhcache
public Ehcache getEhcache()
Return the Ehcache instance backing this Hibernate data region.
-
contains
public boolean contains(java.lang.Object key)
Returnstrueif this region contains data for the given key.This is a Hibernate 3.5 method.
- Specified by:
containsin interfaceorg.hibernate.cache.Region
-
-