org.apache.ignite.internal.processors.cache.query.continuous

## Class CacheContinuousQueryManager

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter
  - - org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager

All Implemented Interfaces:
  GridCacheManager

    public class CacheContinuousQueryManager
    extends GridCacheManagerAdapter

Continuous queries manager.

### Nested Class Summary

Nested Classes
`static class` `CacheContinuousQueryManager.CacheEntryEventImpl`
`protected static class` `CacheContinuousQueryManager.JCacheQueryRemoteFilter` For handler version 2.0 this filter should not be serialized.

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter

`cctx, log`

### Constructor Summary

Constructors
Constructor and Description
`CacheContinuousQueryManager()`

### Method Summary

Methods
`void` `beforeExchange(AffinityTopologyVersion topVer)`
`void` `cancelInternalQuery(UUID routineId)`
`void` `cancelJCacheQuery(javax.cache.configuration.CacheEntryListenerConfiguration cfg)`
`UUID` `executeInternalQuery(javax.cache.event.CacheEntryUpdatedListener<?,?> locLsnr, CacheEntryEventSerializableFilter rmtFilter, boolean loc, boolean notifyExisting, boolean ignoreClassNotFound)`
`void` `executeJCacheQuery(javax.cache.configuration.CacheEntryListenerConfiguration cfg, boolean onStart, boolean keepBinary)`
`UUID` `executeQuery(javax.cache.event.CacheEntryUpdatedListener locLsnr, CacheEntryEventSerializableFilter rmtFilter, javax.cache.configuration.Factory<? extends javax.cache.event.CacheEntryEventFilter> rmtFilterFactory, int bufSize, long timeInterval, boolean autoUnsubscribe, boolean loc, boolean keepBinary, boolean includeExpired)`
`Iterable<javax.cache.event.CacheEntryEvent<?,?>>` `existingEntries(boolean keepBinary, javax.cache.event.CacheEntryEventFilter filter)`
`void` `onEntryExpired(GridCacheEntryEx e, KeyCacheObject key, CacheObject oldVal)`
`void` `onEntryUpdated(KeyCacheObject key, CacheObject newVal, CacheObject oldVal, boolean internal, int partId, boolean primary, boolean preload, long updateCntr, GridDhtAtomicAbstractUpdateFuture fut, AffinityTopologyVersion topVer)`
`void` `onEntryUpdated(Map<UUID,CacheContinuousQueryListener> lsnrCol, KeyCacheObject key, CacheObject newVal, CacheObject oldVal, boolean internal, int partId, boolean primary, boolean preload, long updateCntr, GridDhtAtomicAbstractUpdateFuture fut, AffinityTopologyVersion topVer)`
`protected void` `onKernalStart0()`
`protected void` `onKernalStop0(boolean cancel)`
`void` `onPartitionEvicted(int part)` Partition evicted callback.
`void` `skipUpdateEvent(Map<UUID,CacheContinuousQueryListener> lsnrs, KeyCacheObject key, int partId, long updCntr, boolean primary, AffinityTopologyVersion topVer)`
`protected void` `start0()`
`Map<UUID,CacheContinuousQueryListener>` `updateListeners(boolean internal, boolean preload)`

### Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter

`context, kernalStartInfo, kernalStopInfo, log, onDisconnected, onKernalStart, onKernalStop, printMemoryStats, start, startInfo, stop, stop0, stopInfo, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### CacheContinuousQueryManager

    public CacheContinuousQueryManager()

### Method Detail

#### start0

    protected void start0()
                   throws IgniteCheckedException

Overrides:
  `start0` in class `GridCacheManagerAdapter`
Throws:
  `IgniteCheckedException` - If failed.

#### onKernalStart0

    protected void onKernalStart0()
                           throws IgniteCheckedException

Overrides:
  `onKernalStart0` in class `GridCacheManagerAdapter`
Throws:
  `IgniteCheckedException` - If failed.

#### onKernalStop0

    protected void onKernalStop0(boolean cancel)

Overrides:
  `onKernalStop0` in class `GridCacheManagerAdapter`
Parameters:
  `cancel` - Cancel flag.

#### skipUpdateEvent

    public void skipUpdateEvent(Map<UUID,CacheContinuousQueryListener> lsnrs,
                       KeyCacheObject key,
                       int partId,
                       long updCntr,
                       boolean primary,
                       AffinityTopologyVersion topVer)

Parameters:
  `lsnrs` - Listeners to notify.
  `key` - Entry key.
  `partId` - Partition id.
  `updCntr` - Updated counter.
  `primary` - Primary.
  `topVer` - Topology version.

#### updateListeners

    @Nullable
    public 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
                      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.

#### onEntryUpdated

    public void onEntryUpdated(Map<UUID,CacheContinuousQueryListener> lsnrCol,
                      KeyCacheObject key,
                      CacheObject newVal,
                      CacheObject oldVal,
                      boolean internal,
                      int partId,
                      boolean primary,
                      boolean preload,
                      long updateCntr,
                      @Nullable
                      GridDhtAtomicAbstractUpdateFuture fut,
                      AffinityTopologyVersion topVer)
                        throws IgniteCheckedException

Parameters:
  `lsnrCol` - Listeners to notify.
  `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.
  `topVer` - Topology version.
  `fut` - Dht atomic future.
Throws:
  `IgniteCheckedException` - In case of error.

#### onEntryExpired

    public void onEntryExpired(GridCacheEntryEx e,
                      KeyCacheObject key,
                      CacheObject oldVal)
                        throws IgniteCheckedException

Parameters:
  `e` - Entry.
  `key` - Key.
  `oldVal` - Old value.
Throws:
  `IgniteCheckedException` - In case of error.

#### executeQuery

    public UUID executeQuery(javax.cache.event.CacheEntryUpdatedListener locLsnr,
                    @Nullable
                    CacheEntryEventSerializableFilter rmtFilter,
                    @Nullable
                    javax.cache.configuration.Factory<? extends javax.cache.event.CacheEntryEventFilter> rmtFilterFactory,
                    int bufSize,
                    long timeInterval,
                    boolean autoUnsubscribe,
                    boolean loc,
                    boolean keepBinary,
                    boolean includeExpired)
                      throws IgniteCheckedException

Parameters:
  `locLsnr` - Local listener.
  `rmtFilter` - Remote filter.
  `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)
                              throws IgniteCheckedException

Parameters:
  `locLsnr` - Local listener.
  `rmtFilter` - Remote filter.
  `loc` - Local flag.
  `notifyExisting` - Notify existing 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.

#### beforeExchange

    public void beforeExchange(AffinityTopologyVersion topVer)

Parameters:
  `topVer` - 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.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.8.0
Release Date | : December 5 2016