Click on Javadoc link to open Javadoc documentation.
Package
org.gridgain.grid.spi.eventstorage ![]()
Built-in Implementations
GridGain comes with the following Event Storage SPI implementations:
Description
Grid node's operation produces a steady stream of events that are needed to analyze the execution of the grid tasks and grid related statistics. Node is responsible for storing these local events. Event storage SPI ![]()
Grid interface provides number of methods to access local event and query events from remote nodes:
- Grid.addLocalEventListener
Javadoc - adds local event listener.
- Grid.removeLocalEventListener(GridLocalEventListener)
Javadoc - removes local event listener.
- Grid.queryLocalEvents(GridEventFilter)
Javadoc - queries events occurred on the local node.
- Grid.queryEvents(GridEventFilter, Collection<GridNode>, long)
Javadoc - queries events occurred on the nodes specified, including remote nodes (note that GridEventFilter
Javadoc must implement Serializable Javadoc
).
Note, that peer-class-loading is not enabled for event filters yet, so in order to execute remote event query, you must make sure that GridEventFilter ![]()
Supported Events
The following table describes all events supported by GridGain:
| Event Type | Description |
|---|---|
| CHECKPOINT_LOADED |
Checkpoint was loaded. |
| CHECKPOINT_REMOVED |
Checkpoint was removed (either timeout expired, or manually removed, or automatically removed by task session). |
| CHECKPOINT_SAVED |
Checkpoint was saved. |
| JOB_CANCELLED |
Job got cancelled. |
| JOB_FAILED |
Job has failed. |
| JOB_FAILED_OVER |
Job got failed over. |
| JOB_FINISHED |
Job has successfully completed and produced a result which from the user perspective can still be either negative or positive. |
| JOB_MAPPED |
Grid job was mapped in GridTask.map(List, Object) |
| JOB_QUEUED |
Job arrived for execution and has been queued (added to passive queue during collision resolution). |
| JOB_REJECTED |
Job has been rejected. |
| JOB_RESULTED |
Grid job result was received by GridTask.result(GridJobResult, List) |
| JOB_STARTED |
Job got started. |
| JOB_TIMED_OUT |
Job timed out. |
| NODE_FAILED |
Node failed and left topology unexpectedly. |
| NODE_JOINED |
Node joined topology. |
| NODE_LEFT |
Node left topology. |
| SESSION_ATTR_SET |
Session attribute(s) got set. |
| TASK_DEPLOYED |
Task deployed event. |
| TASK_FAILED |
Task failed. |
| TASK_FINISHED |
Task got finished. |
| TASK_REDUCED |
All split jobs' results were reduced for the task in GridTask.reduce(List) |
| TASK_STARTED |
Task got started. |
| TASK_TIMED_OUT |
Task timed out. |
| TASK_UNDEPLOYED |
Task undeployed event. |
Also see GridEventType ![]()
Configuration
GridEventStorageSpi is provided in Grid Configuration passed into GridFactory ![]()
GridMemoryEventStorageSpispi = new GridMemoryEventStorageSpi(); // Init own events size. spi.setExpireCount(2000); GridConfigurationAdapter cfg = new GridConfigurationAdapter(); // Override default event storage SPI. cfg.setEventStorageSpi(spi); // Start grid. GridFactory.start(cfg);
Note that GridConfiguration interface is just a bean and can also be configured using spring XML configuration.

For more information about using Spring framework for configuration click here.
Default Implementation
By default, in configuration GridMemoryEventStorageSpi is used.

