Interface GridContinuousHandler
-
- All Superinterfaces:
Cloneable,Externalizable,Serializable
- All Known Implementing Classes:
CacheContinuousQueryHandler,CacheContinuousQueryHandlerV2,CacheContinuousQueryHandlerV3,GridMessageListenHandler
public interface GridContinuousHandler extends Externalizable, Cloneable
Continuous routine handler.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classGridContinuousHandler.RegisterStatusListener registration status.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description StringcacheName()GridContinuousHandlerclone()Clones this handler.GridContinuousBatchcreateBatch()Creates new batch.default voidflushOnNodeLeft()Node which started routine leave topology.booleanisEvents()booleanisMessaging()booleanisQuery()booleankeepBinary()voidnotifyCallback(UUID nodeId, UUID routineId, Collection<?> objs, GridKernalContext ctx)Notifies local callback.voidonBatchAcknowledged(UUID routineId, GridContinuousBatch batch, GridKernalContext ctx)Called when ack for a batch is received from client.voidonClientDisconnected()Client node disconnected callback.@Nullable ObjectorderedTopic()voidp2pMarshal(GridKernalContext ctx)Deploys and marshals inner objects (called only if peer deployment is enabled).voidp2pUnmarshal(UUID nodeId, GridKernalContext ctx)Unmarshals inner objects (called only if peer deployment is enabled).GridContinuousHandler.RegisterStatusregister(UUID nodeId, UUID routineId, GridKernalContext ctx)Registers listener.voidunregister(UUID routineId, GridKernalContext ctx)Unregisters listener.Map<Integer,T2<Long,Long>>updateCounters()voidupdateCounters(AffinityTopologyVersion topVer, Map<UUID,Map<Integer,T2<Long,Long>>> cntrsPerNode, Map<Integer,T2<Long,Long>> cntrs)-
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
-
-
-
-
Method Detail
-
register
GridContinuousHandler.RegisterStatus register(UUID nodeId, UUID routineId, GridKernalContext ctx) throws IgniteCheckedException
Registers listener.- Parameters:
nodeId- ID of the node that started routine.routineId- Routine ID.ctx- Kernal context.- Returns:
- Whether listener was actually registered.
- Throws:
IgniteCheckedException- In case of error.
-
unregister
void unregister(UUID routineId, GridKernalContext ctx)
Unregisters listener.- Parameters:
routineId- Routine ID.ctx- Kernal context.
-
notifyCallback
void notifyCallback(UUID nodeId, UUID routineId, Collection<?> objs, GridKernalContext ctx)
Notifies local callback.- Parameters:
nodeId- ID of the node where notification came from.routineId- Routine ID.objs- Notification objects.ctx- Kernal context.
-
p2pMarshal
void p2pMarshal(GridKernalContext ctx) throws IgniteCheckedException
Deploys and marshals inner objects (called only if peer deployment is enabled).- Parameters:
ctx- Kernal context.- Throws:
IgniteCheckedException- In case of error.
-
p2pUnmarshal
void p2pUnmarshal(UUID nodeId, GridKernalContext ctx) throws IgniteCheckedException
Unmarshals inner objects (called only if peer deployment is enabled).- Parameters:
nodeId- Sender node ID.ctx- Kernal context.- Throws:
IgniteCheckedException- In case of error.
-
createBatch
GridContinuousBatch createBatch()
Creates new batch.- Returns:
- New batch.
-
onClientDisconnected
void onClientDisconnected()
Client node disconnected callback.
-
onBatchAcknowledged
void onBatchAcknowledged(UUID routineId, GridContinuousBatch batch, GridKernalContext ctx)
Called when ack for a batch is received from client.- Parameters:
routineId- Routine ID.batch- Acknowledged batch.ctx- Kernal context.
-
flushOnNodeLeft
default void flushOnNodeLeft()
Node which started routine leave topology.
-
orderedTopic
@Nullable @Nullable Object orderedTopic()
- Returns:
- Topic for ordered notifications. If
null, notifications will be sent in non-ordered messages.
-
clone
GridContinuousHandler clone()
Clones this handler.- Returns:
- Clone of this handler.
-
isEvents
boolean isEvents()
- Returns:
Trueif for events.
-
isMessaging
boolean isMessaging()
- Returns:
Trueif for messaging.
-
isQuery
boolean isQuery()
- Returns:
Trueif for continuous queries.
-
keepBinary
boolean keepBinary()
- Returns:
Trueif Ignite Binary objects should be passed to the listener and filter.
-
cacheName
String cacheName()
- Returns:
- Cache name if this is a continuous query handler.
-
updateCounters
void updateCounters(AffinityTopologyVersion topVer, Map<UUID,Map<Integer,T2<Long,Long>>> cntrsPerNode, Map<Integer,T2<Long,Long>> cntrs)
- Parameters:
cntrsPerNode- Init state partition counters for node.cntrs- Init state for partition counters.topVer- Topology version.
-
-