Does anyone know what is the ``name`` argument in Zookeeper's AsyncCallback.StringCallback processResult() method?

StackOverflow https://stackoverflow.com/questions/20793471

  •  21-09-2022
  •  | 
  •  

Question

The API docs are not very enlightening on the subject, and a few Google queries have not yielded much success.

I even have the Zookeeper O'Reilly book, but it appears to be using an older version of the API and I have the distinct impression that this was added recently.

Any help would be greatly appreciated.

Was it helpful?

Solution

The synchronous create() method return a String, so the asynchronous create() method accepts a StringCallback method, where the name is the return value of the synchronous method.

The create() methods need to return a String since if you create a Sequential ZNode, the caller doesn't know the name of the path they created.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top