org.apache.ignite.internal.visor.event

## Class VisorGridEvent

- java.lang.Object
- - org.apache.ignite.internal.visor.VisorDataTransferObject
  - - org.apache.ignite.internal.visor.event.VisorGridEvent

All Implemented Interfaces:
  Externalizable, Serializable

Direct Known Subclasses:
  VisorGridDeploymentEvent, VisorGridDiscoveryEvent, VisorGridEventsLost, VisorGridJobEvent, VisorGridTaskEvent

    public class VisorGridEvent
    extends VisorDataTransferObject

Base class for lightweight counterpart for various `Event`.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`VisorGridEvent()` Default constructor.
`VisorGridEvent(int typeId, IgniteUuid id, String name, UUID nid, long ts, String msg, String shortDisplay)` Create event with given parameters.

### Method Summary

Methods
`IgniteUuid` `getId()`
`String` `getMessage()`
`String` `getName()`
`UUID` `getNid()`
`String` `getShortDisplay()`
`long` `getTimestamp()`
`int` `getTypeId()`
`protected void` `readExternalData(byte protoVer, ObjectInput in)` Load object's specific data content.
`String` `toString()`
`protected void` `writeExternalData(ObjectOutput out)` Save object's specific data content.

### Methods inherited from class org.apache.ignite.internal.visor.VisorDataTransferObject

`getProtocolVersion, readExternal, toList, writeExternal`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### VisorGridEvent

    public VisorGridEvent()

Default constructor.

#### VisorGridEvent

    public VisorGridEvent(int typeId,
                  IgniteUuid id,
                  String name,
                  UUID nid,
                  long ts,
                  @Nullable
                  String msg,
                  String shortDisplay)

Create event with given parameters.

Parameters:
  `typeId` - Event type.
  `id` - Event id.
  `name` - Event name.
  `nid` - Event node ID.
  `ts` - Event timestamp.
  `msg` - Event message.
  `shortDisplay` - Shortened version of `toString()` result.

### Method Detail

#### getTypeId

    public int getTypeId()

Returns:
  Event type.

#### getId

    public IgniteUuid getId()

Returns:
  Globally unique ID of this event.

#### getName

    public String getName()

Returns:
  Name of this event.

#### getNid

    public UUID getNid()

Returns:
  Node Id where event occurred and was recorded.

#### getTimestamp

    public long getTimestamp()

Returns:
  Event timestamp.

#### getMessage

    @Nullable
    public String getMessage()

Returns:
  Event message.

#### getShortDisplay

    public String getShortDisplay()

Returns:
  Shortened version of result. Suitable for humans to read.

#### writeExternalData

    protected void writeExternalData(ObjectOutput out)
                              throws IOException

Save object's specific data content.

Specified by:
  `writeExternalData` in class `VisorDataTransferObject`
Parameters:
  `out` - Output object to write data content.
Throws:
  `IOException` - If I/O errors occur.

#### readExternalData

    protected void readExternalData(byte protoVer,
                        ObjectInput in)
                             throws IOException,
                                    ClassNotFoundException

Load object's specific data content.

Specified by:
  `readExternalData` in class `VisorDataTransferObject`
Parameters:
  `protoVer` - Input object version.
  `in` - Input object to load data content.
Throws:
  `IOException` - If I/O errors occur.
  `ClassNotFoundException` - If the class for an object being restored cannot be found.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.0.0
Release Date | : April 30 2017