GridGain™ 4.3.1e
Enterprise "Big Data" Edition

org.gridgain.grid.events
Class GridJobEvent

java.lang.Object
  extended by org.gridgain.grid.lang.GridMetadataAwareAdapter
      extended by org.gridgain.grid.events.GridEventAdapter
          extended by org.gridgain.grid.events.GridJobEvent
All Implemented Interfaces:
Serializable, Cloneable, Comparable<GridEvent>, GridEvent, GridMetadataAware

public class GridJobEvent
extends GridEventAdapter

Grid job event.

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:

User can also wait for events using the following two methods:

Events and Performance

Note that by default all events in GridGain are enabled and therefore generated and stored by whatever event storage SPI is configured. GridGain can and often does generate thousands events per seconds under the load and therefore it creates a significant additional load on the system. If these events are not needed by the application this load is unnecessary and leads to significant performance degradation.

It is highly recommended to enable only those events that your application logic requires by using either GridConfiguration.getExcludeEventTypes() or GridConfiguration.getIncludeEventTypes() methods 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.

See Also:
GridEventType.EVT_JOB_CANCELLED, GridEventType.EVT_JOB_FAILED, GridEventType.EVT_JOB_FAILED_OVER, GridEventType.EVT_JOB_FINISHED, GridEventType.EVT_JOB_MAPPED, GridEventType.EVT_JOB_QUEUED, GridEventType.EVT_JOB_REJECTED, GridEventType.EVT_JOB_RESULTED, GridEventType.EVT_JOB_STARTED, GridEventType.EVT_JOB_TIMEDOUT, GridEventType.EVTS_JOB_EXECUTION, Serialized Form
 

Constructor Summary
GridJobEvent()
          No-arg constructor.
GridJobEvent(UUID nodeId, String msg, int type)
          Creates job event with given parameters.
 
Method Summary
 GridUuid jobId()
          Gets job ID.
 void jobId(GridUuid jobId)
          Sets job ID.
 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 name of the task that triggered this event.
 UUID taskNodeId()
          Get ID of the node where parent task of the job has originated.
 void taskNodeId(UUID taskNodeId)
          Sets ID of the node where parent task of the job has originated.
 GridUuid taskSessionId()
          Gets task session ID of the task that triggered this event.
 void taskSessionId(GridUuid sesId)
          Sets task session ID of the task that triggered this event.
 String toString()
          
 
Methods inherited from class org.gridgain.grid.events.GridEventAdapter
compareTo, equals, hashCode, id, localOrder, message, message, name, nodeId, nodeId, timestamp, type, type
 
Methods inherited from class org.gridgain.grid.lang.GridMetadataAwareAdapter
addMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, clone, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, putMetaIfAbsent, readExternalMeta, removeMeta, removeMeta, replaceMeta, writeExternalMeta
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.gridgain.grid.GridMetadataAware
addMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, putMetaIfAbsent, removeMeta, removeMeta, replaceMeta
 

Constructor Detail

GridJobEvent

public GridJobEvent()
No-arg constructor.


GridJobEvent

public GridJobEvent(UUID nodeId,
                    String msg,
                    int type)
Creates job event with given parameters.

Parameters:
nodeId - Node ID.
msg - Optional message.
type - Event type.
Method Detail

shortDisplay

public String shortDisplay()
Gets a shortened version of toString() result. Suitable for humans to read.

Specified by:
shortDisplay in interface GridEvent
Overrides:
shortDisplay in class GridEventAdapter
Returns:
Shortened version of toString() result.

taskName

public String taskName()
Gets name of the task that triggered the event.

Returns:
Name of the task that triggered the event.

taskClassName

public String taskClassName()
Gets name of task class that triggered this event.

Returns:
Name of task class that triggered the event.

taskSessionId

public GridUuid taskSessionId()
Gets task session ID of the task that triggered this event.

Returns:
Task session ID of the task that triggered the event.

jobId

public GridUuid jobId()
Gets job ID.

Returns:
Job ID.

taskName

public void taskName(String taskName)
Sets name of the task that triggered this event.

Parameters:
taskName - Task name to set.

taskClassName

public void taskClassName(String taskClsName)
Sets name of the task class that triggered this event.

Parameters:
taskClsName - Task class name to set.

taskSessionId

public void taskSessionId(GridUuid sesId)
Sets task session ID of the task that triggered this event.

Parameters:
sesId - Task session ID to set.

jobId

public void jobId(GridUuid jobId)
Sets job ID.

Parameters:
jobId - Job ID to set.

taskNodeId

public UUID taskNodeId()
Get ID of the node where parent task of the job has originated.

Returns:
ID of the node where parent task of the job has originated.

taskNodeId

public void taskNodeId(UUID taskNodeId)
Sets ID of the node where parent task of the job has originated.

Parameters:
taskNodeId - ID of the node where parent task of the job has originated.

toString

public String toString()

Overrides:
toString in class GridEventAdapter

GridGain™ 4.3.1e
Enterprise "Big Data" Edition

GridGain - In-Memory Big Data
Enterprise "Big Data" Edition, ver. 4.3.1e.10112012
2012 Copyright © GridGain Systems
Follow us:   Follow GridGain on Github Join GridGain User Group Follow GridGain on Twitter Follow GridGain on Vimeo