public class GridMessageListenHandler extends Object implements GridContinuousHandler
GridContinuousHandler.RegisterStatus
Constructor and Description |
---|
GridMessageListenHandler()
Required by
Externalizable . |
GridMessageListenHandler(GridMessageListenHandler orig) |
GridMessageListenHandler(Object topic,
IgniteBiPredicate<UUID,Object> pred) |
Modifier and Type | Method and Description |
---|---|
String |
cacheName() |
GridContinuousHandler |
clone()
Clones this handler.
|
GridContinuousBatch |
createBatch()
Creates new batch.
|
boolean |
isEvents() |
boolean |
isMessaging() |
boolean |
isQuery() |
boolean |
keepBinary() |
void |
notifyCallback(UUID nodeId,
UUID routineId,
Collection<?> objs,
GridKernalContext ctx)
Notifies local callback.
|
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.
|
String |
toString() |
void |
unregister(UUID routineId,
GridKernalContext ctx)
Unregisters listener.
|
void |
updateCounters(AffinityTopologyVersion topVer,
Map<UUID,Map<Integer,T2<Long,Long>>> cntrsPerNode,
Map<Integer,T2<Long,Long>> cntrs) |
void |
writeExternal(ObjectOutput out) |
public GridMessageListenHandler()
Externalizable
.public GridMessageListenHandler(@Nullable Object topic, IgniteBiPredicate<UUID,Object> pred)
topic
- Topic.pred
- Predicate.public GridMessageListenHandler(GridMessageListenHandler orig)
orig
- Handler to be copied.public boolean isEvents()
isEvents
in interface GridContinuousHandler
True
if for events.public boolean isMessaging()
isMessaging
in interface GridContinuousHandler
True
if for messaging.public boolean isQuery()
isQuery
in interface GridContinuousHandler
True
if for continuous queries.public boolean keepBinary()
keepBinary
in interface GridContinuousHandler
True
if Ignite Binary objects should be passed to the listener and filter.public String cacheName()
cacheName
in interface GridContinuousHandler
public void updateCounters(AffinityTopologyVersion topVer, Map<UUID,Map<Integer,T2<Long,Long>>> cntrsPerNode, Map<Integer,T2<Long,Long>> cntrs)
updateCounters
in interface GridContinuousHandler
topVer
- 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 GridContinuousHandler
nodeId
- ID of the node that started routine.routineId
- Routine ID.ctx
- Kernal context.IgniteCheckedException
- In case of error.public void unregister(UUID routineId, GridKernalContext ctx)
unregister
in interface GridContinuousHandler
routineId
- Routine ID.ctx
- Kernal context.public void notifyCallback(UUID nodeId, UUID routineId, Collection<?> objs, GridKernalContext ctx)
notifyCallback
in interface GridContinuousHandler
nodeId
- ID of the node where notification came from.routineId
- Routine ID.objs
- Notification objects.ctx
- Kernal context.public void p2pMarshal(GridKernalContext ctx) throws IgniteCheckedException
p2pMarshal
in interface GridContinuousHandler
ctx
- Kernal context.IgniteCheckedException
- In case of error.public void p2pUnmarshal(UUID nodeId, GridKernalContext ctx) throws IgniteCheckedException
p2pUnmarshal
in interface GridContinuousHandler
nodeId
- Sender node ID.ctx
- Kernal context.IgniteCheckedException
- In case of error.public GridContinuousBatch createBatch()
createBatch
in interface GridContinuousHandler
public void onClientDisconnected()
onClientDisconnected
in interface GridContinuousHandler
public void onBatchAcknowledged(UUID routineId, GridContinuousBatch batch, GridKernalContext ctx)
onBatchAcknowledged
in interface GridContinuousHandler
routineId
- Routine ID.batch
- Acknowledged batch.ctx
- Kernal context.@Nullable public Object orderedTopic()
orderedTopic
in interface GridContinuousHandler
null
, notifications
will be sent in non-ordered messages.public GridContinuousHandler clone()
clone
in interface GridContinuousHandler
clone
in class Object
public void onNodeLeft()
onNodeLeft
in interface GridContinuousHandler
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017