public void sync ( final String path , VoidCallback cb , Object ctx ) { verbotenThreadCheck ( ) ; final String clientPath = path ; PathUtils . validatePath ( clientPath ) ; final String serverPath = prependChroot ( clientPath ) ; RequestHeader h = new RequestHeader ( ) ; h . setType ( ZooDefs . OpCode . sync ) ; SyncRequest request = new SyncRequest ( ) ; SyncResponse response = new SyncResponse ( ) ; request . setPath ( serverPath ) ; cnxn . queuePacket ( h , new ReplyHeader ( ) , request , response , cb , clientPath , serverPath , ctx , null ) ; }
Asynchronous sync . Flushes channel between process and leader .