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

## Class PlatformContinuousQueryImpl

- java.lang.Object
- - org.apache.ignite.internal.processors.platform.cache.query.PlatformContinuousQueryImpl

All Implemented Interfaces:
  Serializable, EventListener, javax.cache.event.CacheEntryEventFilter, javax.cache.event.CacheEntryListener, javax.cache.event.CacheEntryUpdatedListener, CacheEntryEventSerializableFilter, PlatformContinuousQuery, PlatformContinuousQueryFilter

    public class PlatformContinuousQueryImpl
    extends Object
    implements PlatformContinuousQuery

Interop continuous query handle.

See Also:
  Serialized Form

### Field Summary

Fields
`protected Object` `filter` Native filter in serialized form.
`protected javax.cache.event.CacheEntryEventFilter` `javaFilter` Java filter.
`protected PlatformContext` `platformCtx` Context.

### Constructor Summary

Constructors
Constructor and Description
`PlatformContinuousQueryImpl(PlatformContext platformCtx, long ptr, boolean hasFilter, Object filter)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()` Close continuous query.
`boolean` `evaluate(javax.cache.event.CacheEntryEvent evt)`
`PlatformTarget` `getInitialQueryCursor()` Gets initial query cursor (if any).
`void` `onQueryUnregister()` Callback for query unregister event.
`void` `onUpdated(Iterable evts)`
`void` `start(IgniteCacheProxy cache, boolean loc, int bufSize, long timeInterval, boolean autoUnsubscribe, Query initialQry, boolean includeExpired)` Start query execution.
`protected Object` `writeReplace()` Replacer for remote filter.

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

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

### Field Detail

#### platformCtx

    protected final PlatformContext platformCtx

Context.

#### filter

    protected final Object filter

Native filter in serialized form. If null, then filter is either not set, or this is local query.

#### javaFilter

    protected final javax.cache.event.CacheEntryEventFilter javaFilter

Java filter.

### Constructor Detail

#### PlatformContinuousQueryImpl

    public PlatformContinuousQueryImpl(PlatformContext platformCtx,
                                       long ptr,
                                       boolean hasFilter,
                                       Object filter)

Constructor.

Parameters:
  `platformCtx` - Context.
  `ptr` - Pointer to native counterpart.
  `hasFilter` - Whether filter exists.
  `filter` - Filter.

### Method Detail

#### start

    public void start(IgniteCacheProxy cache,
                      boolean loc,
                      int bufSize,
                      long timeInterval,
                      boolean autoUnsubscribe,
                      Query initialQry,
                      boolean includeExpired)
               throws IgniteCheckedException

Start query execution.

Specified by:
  `start` in interface `PlatformContinuousQuery`
Parameters:
  `cache` - Cache.
  `loc` - Local flag.
  `bufSize` - Buffer size.
  `timeInterval` - Time interval.
  `autoUnsubscribe` - Auto-unsubscribe flag.
  `includeExpired` - Whether to include expired events.
  `initialQry` - Initial query.
Throws:
  `IgniteCheckedException` - If failed.

#### onUpdated

    public void onUpdated(Iterable evts)
                   throws javax.cache.event.CacheEntryListenerException

Specified by:
  `onUpdated` in interface `javax.cache.event.CacheEntryUpdatedListener`
Throws:
  `javax.cache.event.CacheEntryListenerException`

#### evaluate

    public boolean evaluate(javax.cache.event.CacheEntryEvent evt)
                     throws javax.cache.event.CacheEntryListenerException

Specified by:
  `evaluate` in interface `javax.cache.event.CacheEntryEventFilter`
Throws:
  `javax.cache.event.CacheEntryListenerException`

#### onQueryUnregister

    public void onQueryUnregister()

Callback for query unregister event.

Specified by:
  `onQueryUnregister` in interface `PlatformContinuousQueryFilter`

#### close

    public void close()

Close continuous query.

Specified by:
  `close` in interface `PlatformContinuousQuery`

#### getInitialQueryCursor

    public PlatformTarget getInitialQueryCursor()

Gets initial query cursor (if any).

Specified by:
  `getInitialQueryCursor` in interface `PlatformContinuousQuery`
Returns:
  Initial query cursor.

#### writeReplace

    protected Object writeReplace()
                           throws ObjectStreamException

Replacer for remote filter.

Returns:
  Filter to be deployed on remote node.
Throws:
  `ObjectStreamException` - If failed.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022