Interface CacheContinuousQueryListener<K,V>
-
public interface CacheContinuousQueryListener<K,V>Continuous query listener.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidacknowledgeBackupOnTimeout(GridKernalContext ctx)voidcleanupOnAck(Map<Integer,Long> updateCntrs)Cleans backup queue.voidflushOnExchangeDone(GridKernalContext ctx, AffinityTopologyVersion topVer)Flushes backup queue.booleanisPrimaryOnly()booleankeepBinary()booleannotifyExisting()booleanoldValueRequired()voidonAfterRegister()voidonBeforeRegister()voidonEntryUpdated(org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryEvent<K,V> evt, boolean primary, boolean recordIgniteEvt, @Nullable GridDhtAtomicAbstractUpdateFuture fut)Entry update callback.voidonPartitionEvicted(int part)voidonRegister()Listener registration callback.voidonUnregister()Listener unregistered callback.@Nullable CounterSkipContextskipUpdateCounter(GridCacheContext cctx, @Nullable CounterSkipContext skipCtx, int part, long cntr, AffinityTopologyVersion topVer, boolean primary)For cache updates in shared cache group need notify others caches CQ listeners that generated counter should be skipped.voidskipUpdateEvent(org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryEvent<K,V> evt, AffinityTopologyVersion topVer, boolean primary)
-
-
-
Method Detail
-
onEntryUpdated
void onEntryUpdated(org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryEvent<K,V> evt, boolean primary, boolean recordIgniteEvt, @Nullable @Nullable GridDhtAtomicAbstractUpdateFuture fut)
Entry update callback.- Parameters:
evt- Eventprimary- Primary flag.recordIgniteEvt- Whether to record event.fut- Dht atomic future.
-
onBeforeRegister
void onBeforeRegister()
-
onAfterRegister
void onAfterRegister()
-
onRegister
void onRegister()
Listener registration callback. NOTE: This method should be called under theCacheGroupContext.listenerLock()} write lock held.
-
onUnregister
void onUnregister()
Listener unregistered callback.
-
cleanupOnAck
void cleanupOnAck(Map<Integer,Long> updateCntrs)
Cleans backup queue.- Parameters:
updateCntrs- Update indexes map.
-
flushOnExchangeDone
void flushOnExchangeDone(GridKernalContext ctx, AffinityTopologyVersion topVer)
Flushes backup queue.- Parameters:
ctx- Context.topVer- Topology version.
-
acknowledgeBackupOnTimeout
void acknowledgeBackupOnTimeout(GridKernalContext ctx)
- Parameters:
ctx- Context.
-
skipUpdateEvent
void skipUpdateEvent(org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryEvent<K,V> evt, AffinityTopologyVersion topVer, boolean primary)
- Parameters:
evt- EventtopVer- Topology version.primary- Primary
-
skipUpdateCounter
@Nullable @Nullable CounterSkipContext skipUpdateCounter(GridCacheContext cctx, @Nullable @Nullable CounterSkipContext skipCtx, int part, long cntr, AffinityTopologyVersion topVer, boolean primary)
For cache updates in shared cache group need notify others caches CQ listeners that generated counter should be skipped.- Parameters:
cctx- Cache context.skipCtx- Context.part- Partition.cntr- Counter to skip.topVer- Topology version.- Returns:
- Context.
-
onPartitionEvicted
void onPartitionEvicted(int part)
- Parameters:
part- Partition.
-
oldValueRequired
boolean oldValueRequired()
- Returns:
- Whether old value is required.
-
keepBinary
boolean keepBinary()
- Returns:
- Keep binary flag.
-
notifyExisting
boolean notifyExisting()
- Returns:
- Whether to notify on existing entries.
-
isPrimaryOnly
boolean isPrimaryOnly()
- Returns:
Trueif this listener should be called on events on primary partitions only.
-
-