org.terracotta.modules.ehcache.coherence
Class CacheShutdownHook

java.lang.Object
  extended by org.terracotta.modules.ehcache.coherence.CacheShutdownHook

public class CacheShutdownHook
extends Object

Author:
Abhishek Sanoujam

Field Summary
static CacheShutdownHook INSTANCE
           
 
Method Summary
 void init()
           
 void registerCache(net.sf.ehcache.Ehcache cache)
          Registers the cache for shutdown hook.
 void unregisterCache(net.sf.ehcache.Ehcache cache)
          Unregisters the cache from shutdown hook.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final CacheShutdownHook INSTANCE
Method Detail

init

public void init()

registerCache

public void registerCache(net.sf.ehcache.Ehcache cache)
Registers the cache for shutdown hook. When the node shuts down, if the cache is in incoherent mode, it will set the cache back to coherent mode. Setting the node back to coherent mode will flush any changes that were made while in incoherent mode. If the shutdown hook is already in progress, throws IllegalStateException


unregisterCache

public void unregisterCache(net.sf.ehcache.Ehcache cache)
Unregisters the cache from shutdown hook. If the shutdown hook is already in progress, throws IllegalStateException



Copyright © 2010 Terracotta, Inc.. All Rights Reserved.