ehcache

net.sf.ehcache.hibernate.regions
Class EhcacheDataRegion

java.lang.Object
  extended by net.sf.ehcache.hibernate.regions.EhcacheDataRegion
All Implemented Interfaces:
org.hibernate.cache.Region
Direct Known Subclasses:
EhcacheQueryResultsRegion, EhcacheTimestampsRegion, EhcacheTransactionalDataRegion

public abstract class EhcacheDataRegion
extends 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

Field Summary
protected  EhcacheAccessStrategyFactory accessStrategyFactory
          The EhcacheAccessStrategyFactory used for creating various access strategies
protected  Ehcache cache
          Ehcache instance backing this Hibernate data region.
 
Method Summary
 boolean contains(Object key)
          Returns true if this region contains data for the given key.
 void destroy()
          
 Ehcache getEhcache()
          Return the Ehcache instance backing this Hibernate data region.
 long getElementCountInMemory()
          
 long getElementCountOnDisk()
          
 String getName()
          
 long getSizeInMemory()
          
 int getTimeout()
          
 long nextTimestamp()
          
 Map toMap()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

protected final Ehcache cache
Ehcache instance backing this Hibernate data region.


accessStrategyFactory

protected final EhcacheAccessStrategyFactory accessStrategyFactory
The EhcacheAccessStrategyFactory used for creating various access strategies

Method Detail

getName

public 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 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(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

ehcache

Copyright © 2003-2012 Terracotta, Inc.. All Rights Reserved.