public class TaskEvent extends EventAdapter
Grid events are used for notification about what happens within the grid. Note that by design Ignite keeps all events generated on the local node locally and it provides APIs for performing a distributed queries across multiple nodes:
IgniteEvents.remoteQuery(org.apache.ignite.lang.IgnitePredicate, long, int...)
-
asynchronously querying events occurred on the nodes specified, including remote nodes.
IgniteEvents.localQuery(org.apache.ignite.lang.IgnitePredicate, int...)
-
querying only local events stored on this local node.
IgniteEvents.localListen(org.apache.ignite.lang.IgnitePredicate, int...)
-
listening to local grid events (events from remote nodes not included).
IgniteEvents.waitForLocal(org.apache.ignite.lang.IgnitePredicate, int...)
.
It is highly recommended to enable only those events that your application logic requires
by using IgniteConfiguration.getIncludeEventTypes()
method in Ignite configuration. Note that certain
events are required for Ignite's internal operations and such events will still be generated but not stored by
event storage SPI if they are disabled in Ignite configuration.
Constructor and Description |
---|
TaskEvent(ClusterNode node,
String msg,
int type,
IgniteUuid sesId,
String taskName,
String taskClsName,
boolean internal,
@Nullable UUID subjId)
Creates task event with given parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
internal()
Returns
true if task is created by Ignite and is used for system needs. |
String |
shortDisplay()
Gets a shortened version of
toString() result. |
@Nullable UUID |
subjectId()
Gets security subject ID initiated this task event, if available.
|
String |
taskClassName()
Gets name of task class that triggered this event.
|
String |
taskName()
Gets name of the task that triggered the event.
|
IgniteUuid |
taskSessionId()
Gets session ID of the task that triggered the event.
|
String |
toString() |
public TaskEvent(ClusterNode node, String msg, int type, IgniteUuid sesId, String taskName, String taskClsName, boolean internal, @Nullable @Nullable UUID subjId)
node
- Node.msg
- Optional message.type
- Event type.sesId
- Task session ID.taskName
- Task name.subjId
- Subject ID.public String shortDisplay()
toString()
result. Suitable for humans to read.shortDisplay
in interface Event
shortDisplay
in class EventAdapter
toString()
result.public String taskName()
public String taskClassName()
public IgniteUuid taskSessionId()
public boolean internal()
true
if task is created by Ignite and is used for system needs.True
if task is created by Ignite and is used for system needs.@Nullable public @Nullable UUID subjectId()
Subject ID will be set either to node ID or client ID initiated task execution.
public String toString()
toString
in class EventAdapter
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024