concept sync in category apache chemistry

appears as: sync, sync
CMIS and Apache Chemistry in Action

This is an excerpt from Manning's book CMIS and Apache Chemistry in Action.

Listing 9.7 shows the two functions: main and sync. There isn’t much to the main function—it starts an infinite loop that calls the sync function, goes to sleep, and then repeats.

The sync function connects to the source and target repositories, asks the source repository for its changes, and persists the change token to be used the next time sync gets called. The function calls processChange for every object that has been created or updated in the source repository.

Listing 9.7. The main and sync functions