Details
Description
public void sync(String path, AsyncCallback.VoidCallback cb, Object ctx) throws KeeperException { checkZk().sync(path, null, null); //callback function cb is not passed in }
It is obvious that the callback method is not passed in. Since sync operation in Zookeeper is a 'async' operation, we need a callback method to notify the caller that the 'sync' operation is finished.