public class GridTaskEvent extends GridEventAdapter
Grid events are used for notification about what happens within the grid. Note that by design GridGain keeps all events generated on the local node locally and it provides APIs for performing a distributed queries across multiple nodes:
GridEvents.remoteQuery(GridPredicate, long) -
asynchronously querying events occurred on the nodes specified, including remote nodes.
GridEvents.localQuery(GridPredicate) -
querying only local events stored on this local node.
GridEvents.localListen(GridPredicate, int...) -
listening to local grid events (events from remote nodes not included).
GridEvents.waitForLocal(GridPredicate, int...).
It is highly recommended to enable only those events that your application logic requires
by using GridConfiguration.getIncludeEventTypes() method in GridGain configuration. Note that certain
events are required for GridGain's internal operations and such events will still be generated but not stored by
event storage SPI if they are disabled in GridGain configuration.
| Constructor and Description |
|---|
GridTaskEvent()
No-arg constructor.
|
GridTaskEvent(UUID nodeId,
String msg,
int type)
Creates task event with given parameters.
|
GridTaskEvent(UUID nodeId,
String msg,
int type,
GridUuid sesId,
String taskName)
Creates task event with given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
internal()
Returns
true if task is created by GridGain and is used for system needs. |
void |
internal(boolean internal)
Set to
true if task is created by GridGain and is used for system needs. |
String |
shortDisplay()
Gets a shortened version of
toString() result. |
String |
taskClassName()
Gets name of task class that triggered this event.
|
void |
taskClassName(String taskClsName)
Sets name of the task class that triggered this event.
|
String |
taskName()
Gets name of the task that triggered the event.
|
void |
taskName(String taskName)
Sets the task name.
|
GridUuid |
taskSessionId()
Gets session ID of the task that triggered the event.
|
void |
taskSessionId(GridUuid sesId)
Sets task session ID.
|
String |
toString() |
public GridTaskEvent()
public GridTaskEvent(UUID nodeId, String msg, int type, GridUuid sesId, String taskName)
nodeId - Node ID.msg - Optional message.type - Event type.sesId - Task session ID.taskName - Task name.public String shortDisplay()
toString() result. Suitable for humans to read.shortDisplay in interface GridEventshortDisplay in class GridEventAdaptertoString() result.public String taskName()
public String taskClassName()
public GridUuid taskSessionId()
public void taskName(String taskName)
taskName - Task name to set.public void taskClassName(String taskClsName)
taskClsName - Task class name to set.public void taskSessionId(GridUuid sesId)
sesId - Task session ID to set.public void internal(boolean internal)
true if task is created by GridGain and is used for system needs.internal - True if task is created by GridGain and is used for system needs.public boolean internal()
true if task is created by GridGain and is used for system needs.True if task is created by GridGain and is used for system needs.public String toString()
toString in class GridEventAdapter
Core Products
:
Data Grid ver. 6.0.2,
Streaming ver. 6.0.2
Accelerators
:
Hadoop Accelerator ver. 6.0.2
Release Date
:
March 24 2014