That method will definitely clear the local cache of the map, but its 
got some gotchas. Like when using strong consistency (or 
invalidateOnChange=false at the CDSM level), it will also broadcast all 
other nodes to clear its local cache. For eventual consistency 
(invalidateOnChange=true), it will clear the local cache of that node only.

Looks like you are using custom-dso mode, as that class isn't really 
exposed from toolkit for express (though I think you can still use it).

Can you explain your use case a bit more, why the need to clear the 
local cache explicitly. You can rely on the consistency modes (strong or 
eventual) (and in case of CDSM, invalidateOnChange=true/false) on when 
the local cache gets invalidated. Trying to see if there is some feature 
request that can come out of it. The consistency modes right now does 
all the hard work to keep the cache consistent with the desired 
consistency, and messing it up may give unexplained behaviors with 
expected consistency guarantees.

HTH

Cheers,
Abhishek


On 7/21/11 8:30 PM, Sergio Bossa wrote:
> Hi guys,
>
> I noticed the method ClusterInfo#getKeysForLocalValues(Map), which I
> used to access local k/v pairs and clear them, doesn't work when the
> map is of type ConcurrentDistributedServerMap, throwing
> "java.lang.UnsupportedOperationException: getAllEntriesSnapshot is not
> supported for CDSM"; Terracotta version is 3.5.2.
>
> Is there a way to access and clear local entries (so that next time
> they're accessed will be loaded back from the L2)? Maybe
> ConcurrentDistributedServerMap#clearLocalCache()?
>
> Thanks!
>
> Sergio B.
>
_______________________________________________
tc-dev mailing list
tc-dev@lists.terracotta.org
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to