From: Flavio J. <fpj...@ya...> - 2008-04-25 02:29:30
|
Hi Stefan, If I understand your question correctly, you can use the SEQUENCE flag when creating child nodes. To identify the last one added, just check which child has the largest sequence value. This queue example in wiki tutorial works similarly, although in the queue example we are interested in the oldest child. -Flavio ----- Original Message ---- From: Stefan Groschupf <sg...@10...> To: Ted Dunning <tdu...@ve...> Cc: "zoo...@li..." <zoo...@li...> Sent: Thursday, April 24, 2008 5:08:46 PM Subject: Re: [Zookeeper-user] zookeeper vs. heartbeat messages > Note that the problem is actually worse than you say since you only > ever get > a single notification from a single zookeeper watch. Yeah - I just hit this point and I'm getting a little confused what exactly a watch is. I thought having one ZkClient that implements watcher and with each notification simply re subscribe notifications with for example exists(path, true) would solve this one notification problem. But looks like I need to create a new ZooKeeper object after each notification? Is that right? Thanks a lot, Stefan ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Zookeeper-user mailing list Zoo...@li... https://lists.sourceforge.net/lists/listinfo/zookeeper-user ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ |