ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Berry <chriswbe...@gmail.com>
Subject Cache Events for a specific cache.
Date Thu, 31 Aug 2017 23:00:08 GMT

I need to watch a simple flag in an “AdminCache” that tells me when the
caches are finished priming.
NOTE: the AdminCache is one of many caches.

This flag is written by one of the Nodes in the Cluster, and other Nodes
should see it change and then react to it.
This AdminCache is very small (a handful of simple flags) and REPLICATED.

I was hoping to use a CacheEvent to do this job.
But that seems impossible now.

Even though I register for this cache like this:

    public void registerCacheSpecificEventListener(String cacheName,
IgnitePredicate<? extends Event> listenerPredicate, int... eventTypes) {

Calling it like this

this, EventType.EVT_CACHE_OBJECT_PUT);

But my logging proves that my Listener `apply` is called for EVERY PUT that
occurs on this Node

Is there any way that I can listen to ONLY changes for a specific cache??
It cannot be performant to fire the Event for every PUT in every cache.

If not. I guess I need to use a ContinuousQuery??
Are there any other options??

-- Chris 

Sent from: http://apache-ignite-users.70518.x6.nabble.com/

View raw message