curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evaristo José Camarero <evaristo.camar...@yahoo.es>
Subject Re: PathChildrenCachebehaviour when reconnected
Date Thu, 26 Sep 2013 15:42:58 GMT
Thanks for the fast answer.

Is the POST_INITIALIZED_EVENT triggered  on RECONNECTION? I thought it was only available
during the FIRST CONNECTION

Let me repeat what I have understand to be sure it is right


After some period connected, when Curator framework  is DISCONNECTED (e.g. network issue),
the cache will be non updated (e.g. some changes in the nodes). Once the ZK client RECONNECTS,
the cache triggers the RECONNECTED event, BUT I do not have guarantee when the RECONNECTED
event is received that cache has finished its sync with ZK. Is that OK? 


I assume that after RECONNECTION the cache will be updated and other events (child added,
removed, changed) will be triggered. IS that OK?

Thanks in adavance,

Evaristo


________________________________
 De: Jordan Zimmerman <jordan@jordanzimmerman.com>
Para: dev@curator.incubator.apache.org; Evaristo José Camarero <evaristo.camarero@yahoo.es>

CC: "user@curator.incubator.apache.org" <user@curator.incubator.apache.org> 
Enviado: Jueves 26 de septiembre de 2013 16:54
Asunto: Re: PathChildrenCachebehaviour when reconnected
 

> Can I assume that the initial cache sync with ZK has finished when this is received?
No - this is just a duplicate of the normal Curator connection state event.

> is there anyway to know when the initial sync has finished?
Start the cache with StartMode.POST_INITIALIZED_EVENT and wait for PathChildrenCacheEvent.Type.INITIALIZED
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message