public class CacheContinuousQueryHandler<K,V> extends Object implements GridContinuousHandler
| Modifier and Type | Class and Description |
|---|---|
protected static class |
CacheContinuousQueryHandler.DeployableObject
Deployable object.
|
GridContinuousHandler.RegisterStatus| Constructor and Description |
|---|
CacheContinuousQueryHandler()
Required by
Externalizable. |
CacheContinuousQueryHandler(String cacheName,
Object topic,
javax.cache.event.CacheEntryUpdatedListener<K,V> locLsnr,
CacheEntryEventSerializableFilter<K,V> rmtFilter,
boolean oldValRequired,
boolean sync,
boolean ignoreExpired,
boolean ignoreClsNotFound)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
cacheName() |
GridContinuousHandler |
clone()
Clones this handler.
|
GridContinuousBatch |
createBatch()
Creates new batch.
|
boolean |
filter(org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryEvent evt,
boolean primary) |
javax.cache.event.CacheEntryEventFilter |
getEventFilter() |
void |
internal(boolean internal) |
boolean |
isEvents() |
boolean |
isMessaging() |
boolean |
isQuery() |
boolean |
keepBinary() |
void |
keepBinary(boolean keepBinary) |
void |
localCache(boolean locCache) |
void |
notifyCallback(UUID nodeId,
UUID routineId,
Collection<?> objs,
GridKernalContext ctx)
Notifies local callback.
|
void |
notifyExisting(boolean notifyExisting) |
void |
onBatchAcknowledged(UUID routineId,
GridContinuousBatch batch,
GridKernalContext ctx)
Called when ack for a batch is received from client.
|
void |
onClientDisconnected()
Client node disconnected callback.
|
void |
onNodeLeft()
Node which started routine leave topology.
|
Object |
orderedTopic() |
void |
p2pMarshal(GridKernalContext ctx)
Deploys and marshals inner objects (called only if peer deployment is enabled).
|
void |
p2pUnmarshal(UUID nodeId,
GridKernalContext ctx)
Unmarshals inner objects (called only if peer deployment is enabled).
|
void |
readExternal(ObjectInput in) |
GridContinuousHandler.RegisterStatus |
register(UUID nodeId,
UUID routineId,
GridKernalContext ctx)
Registers listener.
|
void |
skipPrimaryCheck(boolean skipPrimaryCheck) |
void |
taskNameHash(int taskHash) |
String |
toString() |
void |
unregister(UUID routineId,
GridKernalContext ctx)
Unregisters listener.
|
void |
updateCounters(AffinityTopologyVersion topVer,
Map<UUID,Map<Integer,Long>> cntrsPerNode,
Map<Integer,Long> cntrs) |
void |
waitTopologyFuture(GridKernalContext ctx)
Wait topology.
|
void |
writeExternal(ObjectOutput out) |
public CacheContinuousQueryHandler()
Externalizable.public CacheContinuousQueryHandler(String cacheName, Object topic, javax.cache.event.CacheEntryUpdatedListener<K,V> locLsnr, CacheEntryEventSerializableFilter<K,V> rmtFilter, boolean oldValRequired, boolean sync, boolean ignoreExpired, boolean ignoreClsNotFound)
cacheName - Cache name.topic - Topic for ordered messages.locLsnr - Local listener.rmtFilter - Remote filter.oldValRequired - Old value required flag.sync - Synchronous flag.ignoreExpired - Ignore expired events flag.public void internal(boolean internal)
internal - Internal query.public void notifyExisting(boolean notifyExisting)
notifyExisting - Notify existing.public void localCache(boolean locCache)
locCache - Local cache.public void taskNameHash(int taskHash)
taskHash - Task hash.public void skipPrimaryCheck(boolean skipPrimaryCheck)
skipPrimaryCheck - Whether to skip primary check for REPLICATED cache.public boolean isEvents()
isEvents in interface GridContinuousHandlerTrue if for events.public boolean isMessaging()
isMessaging in interface GridContinuousHandlerTrue if for messaging.public boolean isQuery()
isQuery in interface GridContinuousHandlerTrue if for continuous queries.public boolean keepBinary()
keepBinary in interface GridContinuousHandlerTrue if Ignite Binary objects should be passed to the listener and filter.public void keepBinary(boolean keepBinary)
keepBinary - Keep binary flag.public String cacheName()
cacheName in interface GridContinuousHandlerpublic void updateCounters(AffinityTopologyVersion topVer, Map<UUID,Map<Integer,Long>> cntrsPerNode, Map<Integer,Long> cntrs)
updateCounters in interface GridContinuousHandlertopVer - Topology version.cntrsPerNode - Init state partition counters for node.cntrs - Init state for partition counters.public GridContinuousHandler.RegisterStatus register(UUID nodeId, UUID routineId, GridKernalContext ctx) throws IgniteCheckedException
register in interface GridContinuousHandlernodeId - ID of the node that started routine.routineId - Routine ID.ctx - Kernal context.IgniteCheckedException - In case of error.public javax.cache.event.CacheEntryEventFilter getEventFilter()
public void waitTopologyFuture(GridKernalContext ctx) throws IgniteCheckedException
IgniteCheckedExceptionpublic void unregister(UUID routineId, GridKernalContext ctx)
unregister in interface GridContinuousHandlerroutineId - Routine ID.ctx - Kernal context.public void notifyCallback(UUID nodeId, UUID routineId, Collection<?> objs, GridKernalContext ctx)
notifyCallback in interface GridContinuousHandlernodeId - ID of the node where notification came from.routineId - Routine ID.objs - Notification objects.ctx - Kernal context.public boolean filter(org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryEvent evt,
boolean primary)
primary - Primary.evt - Query event.True if event passed filter otherwise true.public void onClientDisconnected()
onClientDisconnected in interface GridContinuousHandlerpublic void onNodeLeft()
onNodeLeft in interface GridContinuousHandlerpublic void p2pMarshal(GridKernalContext ctx) throws IgniteCheckedException
p2pMarshal in interface GridContinuousHandlerctx - Kernal context.IgniteCheckedException - In case of error.public void p2pUnmarshal(UUID nodeId, GridKernalContext ctx) throws IgniteCheckedException
p2pUnmarshal in interface GridContinuousHandlernodeId - Sender node ID.ctx - Kernal context.IgniteCheckedException - In case of error.public GridContinuousBatch createBatch()
createBatch in interface GridContinuousHandlerpublic void onBatchAcknowledged(UUID routineId, GridContinuousBatch batch, GridKernalContext ctx)
onBatchAcknowledged in interface GridContinuousHandlerroutineId - Routine ID.batch - Acknowledged batch.ctx - Kernal context.@Nullable public Object orderedTopic()
orderedTopic in interface GridContinuousHandlernull, notifications
will be sent in non-ordered messages.public GridContinuousHandler clone()
clone in interface GridContinuousHandlerclone in class Objectpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundException
Follow @ApacheIgnite
Ignite Fabric : ver. 1.9.0 Release Date : March 2 2017