java - In ZooKeeper, is there a way to write a hierarchy atomically without implementing distributed locks yourself? -


let's want write out tree zookeeper

.            .           / \ .          b   c .         / \ .        d   e 

some other client come along , delete node b right after create before i'm able write node 'd' or 'e'.

is there way can write hierarchy atomically, or possibly lock path?

you can use new multi() api

it completes operations or aborts them all.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -