[jboss-user] [JBoss Cache: Core Edition] - Re: Should be able to use ClusteredCacheLoader with CacheMod

manik.surtani@jboss.com do-not-reply at jboss.com
Tue Apr 29 06:50:23 EDT 2008


Well, basically the reason you have a cache loader is so that you have a place to store state that would otherwise be in memory.  As such, state in the cache loader would always be state that is relevant to the node in question.  E.g., if you were using a file-based cache loader, any state on node A would be in CL-A.  

Now with a CCL this still makes sense if you are using replication, since any state on A is replicated to B and C.  So when you look up the cache loader on A for this state, it is accurate to what was originally in A.

Now if the cluster is not replicated, nodes A, B and C would have different state, potentially using the same Fqns.  And using a CCL here could result in meaningless state retrieval.

E.g., 

  | cacheA.put("/a/b/c", "key", "ValueA"); // does not replicate
  | cacheB.put("/a/b/c", "key", "ValueB"); // does not replicate
  | 
  | // cache A evicts /a/b/c
  |   
  | // am expecting ValueA if I was using a file cache loader
  | // but a CCL will get me ValueB!
  | cacheA.get("/a/b/c", "key"); 
  | 

HTH!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147476#4147476

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147476



More information about the jboss-user mailing list