Consider the following scenario. There are 4 replicated TreeCaches in the same cluster. Each TreeCache (TC) runs on a separate machine. The network physically splits up in two parts (e.g. by pulling some cables). Now there are two clusters each with 2 replicated TCs. Any changes made on a TC is replicated to the other TC that is part of the same cluster but not to the TCs that are in the "other" cluster (physically unreachable). When the cables are replaced both clusters will be merged by the underlying JGroups and I receive a MergeView. The TCs are not synced.
At this point I want to merge the contents of the TCs. I want to find out the differences between the TCs that lived on both sides of the pulled cables. Does TC provide a way to help me find out the diffs?
You could create a subclass of TreeCache, provide a method merge() and call it via callRemoteMethods().
I have state merging (via a policy object) on the roadmap.