curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Zimmerman <>
Subject Re: Cache block on start
Date Tue, 11 Jun 2013 04:04:25 GMT
If you want to block, use POST_INITIALIZED_EVENT and use a CountDownLatch or something to block
on until you get the event.

On Jun 10, 2013, at 8:52 PM, John Vines <> wrote:

> I'm currently doing that, but I'm under the impression that just starts the background
processes in building the cache, not block until the cache is fully populated.
> On Mon, Jun 10, 2013 at 10:50 PM, Jordan Zimmerman <>
> Pass BUILD_INITIAL_CACHE for the start mode.
> On Jun 10, 2013, at 7:27 PM, John Vines <> wrote:
> > I'm using a PathChildrenCache for maintaining some state information in my code,
including a listener event. But when I first start up my process it takes a while for the
cache to update (and subsequently the listener events to trigger and populate another cache).
Is there a way to force the cache to build, at start time or otherwise, that will still trigger
listener events? I have no guarantees that the listeners will trigger when I start, so I cannot
poll on that either.
> >
> > Thanks
> > John

View raw message