org.apache.ignite.internal.visor.util

## Class VisorEventMapper

- java.lang.Object
- - org.apache.ignite.internal.visor.util.VisorEventMapper

All Implemented Interfaces:
  Serializable, IgniteClosure<Event,VisorGridEvent>

    public class VisorEventMapper
    extends Object
    implements IgniteClosure<Event,VisorGridEvent>

Mapper from grid event to Visor data transfer object.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`VisorEventMapper()`

### Method Summary

All Methods Instance Methods Concrete Methods
`VisorGridEvent` `apply(Event evt)` Closure body.
`protected VisorGridEvent` `deploymentEvent(DeploymentEvent de, int type, IgniteUuid id, String name, UUID nid, long ts, String msg, String shortDisplay)`
`protected VisorGridEvent` `discoveryEvent(DiscoveryEvent de, int type, IgniteUuid id, String name, UUID nid, long ts, String msg, String shortDisplay)`
`protected VisorGridEvent` `jobEvent(JobEvent je, int type, IgniteUuid id, String name, UUID nid, long ts, String msg, String shortDisplay)`
`protected VisorGridEvent` `map(Event evt, int type, IgniteUuid id, String name, UUID nid, long ts, String msg, String shortDisplay)` Map grid event to Visor data transfer object.
`protected VisorGridEvent` `taskEvent(TaskEvent te, int type, IgniteUuid id, String name, UUID nid, long ts, String msg, String shortDisplay)`

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

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

### Constructor Detail

#### VisorEventMapper

    public VisorEventMapper()

### Method Detail

#### map

    protected VisorGridEvent map(Event evt,
                                 int type,
                                 IgniteUuid id,
                                 String name,
                                 UUID nid,
                                 long ts,
                                 String msg,
                                 String shortDisplay)

Map grid event to Visor data transfer object.

Parameters:
  `evt` - Grid event.
  `type` - Event's type.
  `id` - Event id.
  `name` - Event name.
  `nid` - Event node ID.
  `ts` - Event timestamp.
  `msg` - Event message.
  `shortDisplay` - Shortened version of `toString()` result.
Returns:
  Visor data transfer object for event.

#### taskEvent

    protected VisorGridEvent taskEvent(TaskEvent te,
                                       int type,
                                       IgniteUuid id,
                                       String name,
                                       UUID nid,
                                       long ts,
                                       String msg,
                                       String shortDisplay)

Parameters:
  `te` - Task event.
  `type` - Event's type.
  `id` - Event id.
  `name` - Event name.
  `nid` - Event node ID.
  `ts` - Event timestamp.
  `msg` - Event message.
  `shortDisplay` - Shortened version of `toString()` result.
Returns:
  Visor data transfer object for event.

#### jobEvent

    protected VisorGridEvent jobEvent(JobEvent je,
                                      int type,
                                      IgniteUuid id,
                                      String name,
                                      UUID nid,
                                      long ts,
                                      String msg,
                                      String shortDisplay)

Parameters:
  `je` - Job event.
  `type` - Event's type.
  `id` - Event id.
  `name` - Event name.
  `nid` - Event node ID.
  `ts` - Event timestamp.
  `msg` - Event message.
  `shortDisplay` - Shortened version of `toString()` result.
Returns:
  Visor data transfer object for event.

#### deploymentEvent

    protected VisorGridEvent deploymentEvent(DeploymentEvent de,
                                             int type,
                                             IgniteUuid id,
                                             String name,
                                             UUID nid,
                                             long ts,
                                             String msg,
                                             String shortDisplay)

Parameters:
  `de` - Deployment event.
  `type` - Event's type.
  `id` - Event id.
  `name` - Event name.
  `nid` - Event node ID.
  `ts` - Event timestamp.
  `msg` - Event message.
  `shortDisplay` - Shortened version of `toString()` result.
Returns:
  Visor data transfer object for event.

#### discoveryEvent

    protected VisorGridEvent discoveryEvent(DiscoveryEvent de,
                                            int type,
                                            IgniteUuid id,
                                            String name,
                                            UUID nid,
                                            long ts,
                                            String msg,
                                            String shortDisplay)

Parameters:
  `de` - Discovery event.
  `type` - Event's type.
  `id` - Event id.
  `name` - Event name.
  `nid` - Event node ID.
  `ts` - Event timestamp.
  `msg` - Event message.
  `shortDisplay` - Shortened version of `toString()` result.
Returns:
  Visor data transfer object for event.

#### apply

    public VisorGridEvent apply(Event evt)

Closure body.

Specified by:
  `apply` in interface `IgniteClosure<Event,VisorGridEvent>`
Parameters:
  `evt` - Closure parameter.
Returns:
  Closure return value.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.6
Release Date | : September 11 2019