org.onebusaway.container.spring.ehcache
Class EhCacheProvider

java.lang.Object
  extended by org.onebusaway.container.spring.ehcache.EhCacheProvider
All Implemented Interfaces:
org.hibernate.cache.CacheProvider

public class EhCacheProvider
extends Object
implements org.hibernate.cache.CacheProvider

Provides an EhCache-based Hibernate CacheProvider implementation that supports directly setting the CacheManager from an existing manager instance. The CacheProvider implementation provided by EhCache only supports configuration from classpath resources.

Author:
bdferris
See Also:
EhCacheManagerFactoryBean

Constructor Summary
EhCacheProvider()
           
 
Method Summary
 org.hibernate.cache.Cache buildCache(String name, Properties properties)
           
 boolean isMinimalPutsEnabledByDefault()
           
 long nextTimestamp()
           
 void setCacheManager(net.sf.ehcache.CacheManager cacheManager)
           
 void start(Properties properties)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EhCacheProvider

public EhCacheProvider()
Method Detail

setCacheManager

public void setCacheManager(net.sf.ehcache.CacheManager cacheManager)

buildCache

public org.hibernate.cache.Cache buildCache(String name,
                                            Properties properties)
                                     throws org.hibernate.cache.CacheException
Specified by:
buildCache in interface org.hibernate.cache.CacheProvider
Throws:
org.hibernate.cache.CacheException

isMinimalPutsEnabledByDefault

public boolean isMinimalPutsEnabledByDefault()
Specified by:
isMinimalPutsEnabledByDefault in interface org.hibernate.cache.CacheProvider

nextTimestamp

public long nextTimestamp()
Specified by:
nextTimestamp in interface org.hibernate.cache.CacheProvider

start

public void start(Properties properties)
           throws org.hibernate.cache.CacheException
Specified by:
start in interface org.hibernate.cache.CacheProvider
Throws:
org.hibernate.cache.CacheException

stop

public void stop()
Specified by:
stop in interface org.hibernate.cache.CacheProvider


Copyright © 2011 OneBusAway. All Rights Reserved.