GridGain™ 2.0.3
Java API Specification

org.gridgain.grid
Interface GridEvent

All Superinterfaces:
Serializable

@Apache20LicenseCompatible
public interface GridEvent
extends Serializable

Grid events are used for notification about what happens within 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. See Grid.queryEvents(GridEventFilter, Collection, long) and Grid.queryLocalEvents(GridEventFilter) for information on how to query events within grid.

You can also subscribe for local node event notifications through Grid.addLocalEventListener(GridLocalEventListener) method.

Note that most of the properties of the event are optional. Only the following properties are always set and are not null:





See Also:

  Documentation
  Email Support
  Online Forums
  Issue Tracking

Author:   2005-2008 Copyright © GridGain Systems. All Rights Reserved. ver. 2.0.3

 

Method Summary
 String getCheckpointKey()
          Gets checkpoint key associated with this event.
 UUID getEventNodeId()
          Gets ID of the node related to this event, e.g. if node joined or left topology this method will return ID of that node.
 UUID getJobId()
          Gets job ID, possibly null if event is not job related.
 UUID getLocalNodeId()
          Gets event local node ID, i.e. the ID of the node where event was recorded.
 String getMessage()
          Gets message associated with this event.
 String getTaskName()
          Gets name of the task that triggered the event.
 UUID getTaskSessionId()
          Gets session ID of the task that triggered the event.
 long getTimestamp()
          Gets event timestamp.
 GridEventType getType()
          Gets grid event type.
 

Method Detail

getType

GridEventType getType()
Gets grid event type.

Returns:
Grid event type.

getLocalNodeId

UUID getLocalNodeId()
Gets event local node ID, i.e. the ID of the node where event was recorded. Grid event always happens on some node so node is always present. Note that this node ID is generally different from the one available via GridEvent.getEventNodeId() method.

Returns:
ID of the node where event was recorded.
See Also:
GridEvent.getEventNodeId()

getEventNodeId

UUID getEventNodeId()
Gets ID of the node related to this event, e.g. if node joined or left topology this method will return ID of that node. Possibly null if event is not node related. Note that this node ID is generally different from the one available via GridEvent.getLocalNodeId() method.

Returns:
ID of the node related to this event. Possibly null if event is not node related.
See Also:
GridEvent.getLocalNodeId()

getCheckpointKey

String getCheckpointKey()
Gets checkpoint key associated with this event. Possibly null if event is not checkpoint related.

Returns:
Checkpoint key associated with this event. Possibly null if event is not checkpoint related.

getTaskName

String getTaskName()
Gets name of the task that triggered the event. Possibly null if event is not task related.

Returns:
Name of the task that triggered the event.

getTaskSessionId

UUID getTaskSessionId()
Gets session ID of the task that triggered the event. Possibly null if event is not task related.

Returns:
Session ID of the task that triggered the event.

getJobId

UUID getJobId()
Gets job ID, possibly null if event is not job related.

Returns:
Job ID.

getMessage

String getMessage()
Gets message associated with this event. Possibly null if event provided no message.

Returns:
Message associated with this event.

getTimestamp

long getTimestamp()
Gets event timestamp. Timestamp is local to node on which this event was produced. This event property is always set.

Returns:
Event timestamp.

GridGain™ 2.0.3
Java API Specification

GridGain™ - Grid Computing Made Simple, ver. 2.0.3.20052008
2005-2008 Copyright © GridGain Systems. All Rights Reserved.