I'm observing TDReplicator to determine when async replication is complete and to get an idea of replication progress, but the update() method of my Observer class is never called. The intent to use the Observable/Observer pattern is there -- TDReplicator.setChangesTotal() and setChangesProcessed() call notifyObservers(), but nothing calls them. Instead, TDPuller and TDPusher modify the changesTotal and changesProcessed member variables directly.
In this pull request, I have made changesTotal and changesProcessed private and have updated TDPuller and TDPusher to use the setter methods any time the number of changes, er, changes. As a result, my observer is being called as expected.
make changesProcessed and changesTotal private and change TDPusher an…
…d TDPuller to use the access methods. This ensures that Observers get called with replication changes.
Thanks for the contribution.