Class CacheContinuousQueryManager<K,​V>

    • Constructor Detail

      • CacheContinuousQueryManager

        public CacheContinuousQueryManager()
    • Method Detail

      • stop0

        protected void stop0​(boolean cancel,
                             boolean destroy)
        Overrides:
        stop0 in class GridCacheManagerAdapter<K,​V>
        Parameters:
        cancel - Cancel flag.
        destroy - Cache destroy flag.
      • skipUpdateCounter

        @Nullable
        public @Nullable CounterSkipContext skipUpdateCounter​(@Nullable
                                                              @Nullable CounterSkipContext skipCtx,
                                                              int part,
                                                              long cntr,
                                                              AffinityTopologyVersion topVer,
                                                              boolean primary)
        Parameters:
        skipCtx - Context.
        part - Partition number.
        cntr - Update counter.
        topVer - Topology version.
        Returns:
        Context.
      • closeBackupUpdateCountersGaps

        @Nullable
        public void closeBackupUpdateCountersGaps​(GridCacheContext cctx,
                                                  int part,
                                                  AffinityTopologyVersion topVer,
                                                  GridLongList gaps)
        For cache updates in shared cache group need notify others caches CQ listeners that generated counter should be skipped.
        Parameters:
        cctx - Cache context.
        part - Partition.
        topVer - Topology version.
        gaps - Even-length array of pairs [start, end] for each gap.
      • updateListeners

        @Nullable
        public @Nullable Map<UUID,​CacheContinuousQueryListener> updateListeners​(boolean internal,
                                                                                      boolean preload)
        Parameters:
        internal - Internal entry flag (internal key or not user cache).
        preload - Whether update happened during preloading.
        Returns:
        Registered listeners.
      • onEntryUpdated

        public void onEntryUpdated​(KeyCacheObject key,
                                   CacheObject newVal,
                                   CacheObject oldVal,
                                   boolean internal,
                                   int partId,
                                   boolean primary,
                                   boolean preload,
                                   long updateCntr,
                                   @Nullable
                                   @Nullable GridDhtAtomicAbstractUpdateFuture fut,
                                   AffinityTopologyVersion topVer)
                            throws IgniteCheckedException
        Parameters:
        key - Key.
        newVal - New value.
        oldVal - Old value.
        internal - Internal entry (internal key or not user cache).
        partId - Partition.
        primary - True if called on primary node.
        preload - Whether update happened during preloading.
        updateCntr - Update counter.
        fut - Dht atomic future.
        topVer - Topology version.
        Throws:
        IgniteCheckedException - In case of error.
      • executeQuery

        public UUID executeQuery​(@Nullable
                                 @Nullable javax.cache.event.CacheEntryUpdatedListener locLsnr,
                                 @Nullable
                                 @Nullable ContinuousQueryWithTransformer.EventListener locTransLsnr,
                                 @Nullable
                                 @Nullable CacheEntryEventSerializableFilter<K,​V> rmtFilter,
                                 @Nullable
                                 @Nullable javax.cache.configuration.Factory<javax.cache.event.CacheEntryEventFilter<K,​V>> rmtFilterFactory,
                                 @Nullable
                                 @Nullable javax.cache.configuration.Factory<IgniteClosure<K,​V>> rmtTransFactory,
                                 int bufSize,
                                 long timeInterval,
                                 boolean autoUnsubscribe,
                                 boolean loc,
                                 boolean keepBinary,
                                 boolean includeExpired)
                          throws IgniteCheckedException
        Parameters:
        locLsnr - Local listener.
        rmtFilter - Remote filter.
        rmtFilterFactory - Remote filter factory
        bufSize - Buffer size.
        timeInterval - Time interval.
        autoUnsubscribe - Auto unsubscribe flag.
        loc - Local flag.
        Returns:
        Continuous routine ID.
        Throws:
        IgniteCheckedException - In case of error.
      • executeInternalQuery

        public UUID executeInternalQuery​(javax.cache.event.CacheEntryUpdatedListener<?,​?> locLsnr,
                                         CacheEntryEventSerializableFilter rmtFilter,
                                         boolean loc,
                                         boolean notifyExisting,
                                         boolean ignoreClassNotFound,
                                         boolean sync)
                                  throws IgniteCheckedException
        Parameters:
        locLsnr - Local listener.
        rmtFilter - Remote filter.
        loc - Local flag.
        notifyExisting - Notify existing flag.
        sync - Synchronous flag.
        Returns:
        Continuous routine ID.
        Throws:
        IgniteCheckedException - In case of error.
      • cancelInternalQuery

        public void cancelInternalQuery​(UUID routineId)
        Parameters:
        routineId - Consume ID.
      • executeJCacheQuery

        public void executeJCacheQuery​(javax.cache.configuration.CacheEntryListenerConfiguration cfg,
                                       boolean onStart,
                                       boolean keepBinary)
                                throws IgniteCheckedException
        Parameters:
        cfg - Listener configuration.
        onStart - Whether listener is created on node start.
        Throws:
        IgniteCheckedException - If failed.
      • cancelJCacheQuery

        public void cancelJCacheQuery​(javax.cache.configuration.CacheEntryListenerConfiguration cfg)
                               throws IgniteCheckedException
        Parameters:
        cfg - Listener configuration.
        Throws:
        IgniteCheckedException - In case of error.
      • flushOnExchangeDone

        public void flushOnExchangeDone​(AffinityTopologyVersion topVer)
        Parameters:
        topVer - Finished exchange topology version.
      • onPartitionEvicted

        public void onPartitionEvicted​(int part)
        Partition evicted callback.
        Parameters:
        part - Partition number.
      • existingEntries

        public Iterable<javax.cache.event.CacheEntryEvent<?,​?>> existingEntries​(boolean keepBinary,
                                                                                      javax.cache.event.CacheEntryEventFilter filter)
                                                                               throws IgniteCheckedException
        Parameters:
        keepBinary - Keep binary flag.
        filter - Filter.
        Returns:
        Iterable for events created for existing cache entries.
        Throws:
        IgniteCheckedException - If failed.