PathChildrenCache listener error handling

52 views
Skip to first unread message

Eric Tschetter

unread,
Apr 11, 2013, 1:39:04 PM4/11/13
to curato...@googlegroups.com
I just sent this message to the netflix listserv list and then remembered that it moved.  Feel free to ignore it on the netflix listserv if you still receive that...

I'm trying to use a PathChildrenCache to basically deserialize some znode children and store the deserialized Java objects.  Looking at the different types of PathChildrenCacheEvent.Type, I'm wondering if I need to handle all of those cases and how to properly handle some of them?

What I want is to maintain my cache of objects even if ZK goes down, but when ZK comes up to resync.  I'm hoping all I have to do is implement the intuitive thing for CHILD_ADDED, CHILD_UPDATED, and CHILD_REMOVED, is that hope a reality? :)

Also, the docs indicate:

PathChildrenCache instances internally monitor a ConnectionStateListener. If the connection state changes, the cache is reset (the PathChildrenCacheListener will receive a RESET).

But, I don't see RESET as a possible Type.

--Eric
Reply all
Reply to author
Forward
0 new messages