org.terracotta.modules.ehcache.event
Class ClusteredEventReplicator

java.lang.Object
  extended by org.terracotta.modules.ehcache.event.ClusteredEventReplicator
All Implemented Interfaces:
Cloneable, net.sf.ehcache.event.CacheEventListener

public class ClusteredEventReplicator
extends Object
implements net.sf.ehcache.event.CacheEventListener


Constructor Summary
ClusteredEventReplicator(net.sf.ehcache.Ehcache cache, net.sf.ehcache.config.TerracottaConfiguration.ValueMode valueMode)
           
 
Method Summary
 ClusteredEventReplicator clone()
           
 void dispose()
           
 void dmiNotifyElementEvicted(Object key, Object elementData, String clientID)
           
 void dmiNotifyElementExpired(Object key, Object elementData, String clientID)
           
 void dmiNotifyElementPut(Object key, Object elementData, String clientID)
           
 void dmiNotifyElementRemoved(Object key, Object elementData, String clientID)
           
 void dmiNotifyElementUpdated(Object key, Object elementData, String clientID)
           
 void dmiNotifyRemoveAll(String clientID)
           
 void initializeOnLoad()
           
 void initializeTransients(net.sf.ehcache.Ehcache theCache)
          This method is used for common on-load and instantiation logic.
 void notifyElementEvicted(net.sf.ehcache.Ehcache theCache, net.sf.ehcache.Element element)
           
 void notifyElementExpired(net.sf.ehcache.Ehcache theCache, net.sf.ehcache.Element element)
           
 void notifyElementPut(net.sf.ehcache.Ehcache theCache, net.sf.ehcache.Element element)
           
 void notifyElementRemoved(net.sf.ehcache.Ehcache theCache, net.sf.ehcache.Element element)
           
 void notifyElementUpdated(net.sf.ehcache.Ehcache theCache, net.sf.ehcache.Element element)
           
 void notifyRemoveAll(net.sf.ehcache.Ehcache theCache)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusteredEventReplicator

public ClusteredEventReplicator(net.sf.ehcache.Ehcache cache,
                                net.sf.ehcache.config.TerracottaConfiguration.ValueMode valueMode)
Method Detail

initializeOnLoad

public void initializeOnLoad()

initializeTransients

public void initializeTransients(net.sf.ehcache.Ehcache theCache)
This method is used for common on-load and instantiation logic. We can't rely on the standard DSO on-load feature since roots of ClusteredEventDispatcher are explicitly created in TerracottaClusteredInstanceFactory through a ManagerUtil call, as opposed to the regular root declaration in DSO instrumented classes.

This approach is needed for 'express' features since none of the application context classes can be instrumented by Terracotta due to the lack of a boot jar.


notifyElementRemoved

public void notifyElementRemoved(net.sf.ehcache.Ehcache theCache,
                                 net.sf.ehcache.Element element)
                          throws net.sf.ehcache.CacheException
Specified by:
notifyElementRemoved in interface net.sf.ehcache.event.CacheEventListener
Throws:
net.sf.ehcache.CacheException

notifyElementPut

public void notifyElementPut(net.sf.ehcache.Ehcache theCache,
                             net.sf.ehcache.Element element)
                      throws net.sf.ehcache.CacheException
Specified by:
notifyElementPut in interface net.sf.ehcache.event.CacheEventListener
Throws:
net.sf.ehcache.CacheException

notifyElementUpdated

public void notifyElementUpdated(net.sf.ehcache.Ehcache theCache,
                                 net.sf.ehcache.Element element)
                          throws net.sf.ehcache.CacheException
Specified by:
notifyElementUpdated in interface net.sf.ehcache.event.CacheEventListener
Throws:
net.sf.ehcache.CacheException

notifyElementExpired

public void notifyElementExpired(net.sf.ehcache.Ehcache theCache,
                                 net.sf.ehcache.Element element)
                          throws net.sf.ehcache.CacheException
Specified by:
notifyElementExpired in interface net.sf.ehcache.event.CacheEventListener
Throws:
net.sf.ehcache.CacheException

notifyElementEvicted

public void notifyElementEvicted(net.sf.ehcache.Ehcache theCache,
                                 net.sf.ehcache.Element element)
                          throws net.sf.ehcache.CacheException
Specified by:
notifyElementEvicted in interface net.sf.ehcache.event.CacheEventListener
Throws:
net.sf.ehcache.CacheException

notifyRemoveAll

public void notifyRemoveAll(net.sf.ehcache.Ehcache theCache)
Specified by:
notifyRemoveAll in interface net.sf.ehcache.event.CacheEventListener

dispose

public void dispose()
Specified by:
dispose in interface net.sf.ehcache.event.CacheEventListener

clone

public ClusteredEventReplicator clone()
                               throws CloneNotSupportedException
Specified by:
clone in interface net.sf.ehcache.event.CacheEventListener
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

dmiNotifyElementPut

public void dmiNotifyElementPut(Object key,
                                Object elementData,
                                String clientID)
                         throws net.sf.ehcache.CacheException
Throws:
net.sf.ehcache.CacheException

dmiNotifyElementUpdated

public void dmiNotifyElementUpdated(Object key,
                                    Object elementData,
                                    String clientID)

dmiNotifyElementExpired

public void dmiNotifyElementExpired(Object key,
                                    Object elementData,
                                    String clientID)

dmiNotifyElementEvicted

public void dmiNotifyElementEvicted(Object key,
                                    Object elementData,
                                    String clientID)

dmiNotifyElementRemoved

public void dmiNotifyElementRemoved(Object key,
                                    Object elementData,
                                    String clientID)
                             throws net.sf.ehcache.CacheException
Throws:
net.sf.ehcache.CacheException

dmiNotifyRemoveAll

public void dmiNotifyRemoveAll(String clientID)


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