[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Cluster listener  XML
Forum Index -> Terracotta Platform
Author Message
Dckc

master

Joined: 09/08/2010 09:00:39
Messages: 59
Offline

Hi All,

I have a terracotta cluster that contains 4 nodes, I am using terracotta toolkit to share a map.

I need to let all nodes know when a change happens in the map, is there any way to notify all nodes that something has changed in the map?

Can we extend from terracotta Cluster listener and create a new event.

Thank you very much

Regards
rajoshi

seraphim

Joined: 07/04/2011 04:36:10
Messages: 1465
Offline

You may use terracotta cacheEventListenerFactory to implement this , by creating a custom listner class using this factory which serves your purpose.

To use this you need to a make a entry for this in the ehcache.xml like this :

<cache name="keyword_cache" maxElementsInMemory="20000"
maxElementsOnDisk="5000000" eternal="true" timeToIdleSeconds="60"
timeToLiveSeconds="50">
<cacheEventListenerFactory class="net.sf.ehcache.event.TerracottaCacheEventReplicationFactory" properties="" listenFor="all"/>
<cacheEventListenerFactory class="com.tc.ehcache.MyCacheEventListenerFactory" properties="" listenFor="all"/>
<!--<cacheLoaderFactory class="com.tc.ehcache.CountingCacheLoaderFactory"/>-->
<terracotta />
</cache>

Rakesh Joshi
Terracotta.
 
Forum Index -> Terracotta Platform
Go to:   
Powered by JForum 2.1.7 © JForum Team