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 Modifier and Type Field Description protected ObjectfilterNative filter in serialized form.protected javax.cache.event.CacheEntryEventFilterjavaFilterJava filter.protected PlatformContextplatformCtxContext.
-
Constructor Summary
Constructors Constructor Description PlatformContinuousQueryImpl(PlatformContext platformCtx, long ptr, boolean hasFilter, Object filter)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close continuous query.booleanevaluate(javax.cache.event.CacheEntryEvent evt)PlatformTargetgetInitialQueryCursor()Gets initial query cursor (if any).voidonQueryUnregister()Callback for query unregister event.voidonUpdated(Iterable evts)voidstart(IgniteCacheProxy cache, boolean loc, int bufSize, long timeInterval, boolean autoUnsubscribe, Query initialQry, boolean includeExpired)Start query execution.protected ObjectwriteReplace()Replacer for remote filter.
-
-
-
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:
startin interfacePlatformContinuousQuery- 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:
onUpdatedin interfacejavax.cache.event.CacheEntryUpdatedListener- Throws:
javax.cache.event.CacheEntryListenerException
-
evaluate
public boolean evaluate(javax.cache.event.CacheEntryEvent evt) throws javax.cache.event.CacheEntryListenerException- Specified by:
evaluatein interfacejavax.cache.event.CacheEntryEventFilter- Throws:
javax.cache.event.CacheEntryListenerException
-
onQueryUnregister
public void onQueryUnregister()
Callback for query unregister event.- Specified by:
onQueryUnregisterin interfacePlatformContinuousQueryFilter
-
close
public void close()
Close continuous query.- Specified by:
closein interfacePlatformContinuousQuery
-
getInitialQueryCursor
public PlatformTarget getInitialQueryCursor()
Gets initial query cursor (if any).- Specified by:
getInitialQueryCursorin interfacePlatformContinuousQuery- 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.
-
-