Hi. I am testing a simple system which listen to updates to the cache.
The updates are trigger upon transaction-commit.
The code structure is something like below.
//Create an empty map and put in the treecache
cache.put(fqn, new Map());
Node node = cache.get(fqn);
Map map = node.getData();
The TreeCacheListener will report NodeModify 3 times, when the transaction is committed.
Is there anyway in which I can monitor changes in the cache where it will only notify one time when a node is edited multiple times in a single transaction. I think currently for every changes made to the node, it will be reported upon replication. i.e. If I update the same node 20 times, upon transaction commit and replication, the listener will receive nodeModify event 20 times.
No, there is no such mechanism at the moment. Create a feature request for this in JIRA and vote for it; it sounds sensible that a single modification list is sent along with the tx commit notification and individual mods suppressed.