org.apache.ignite.internal.processors.jobmetrics

## Class GridJobMetricsProcessor

- java.lang.Object
- - org.apache.ignite.internal.processors.GridProcessorAdapter
  - - org.apache.ignite.internal.processors.jobmetrics.GridJobMetricsProcessor

All Implemented Interfaces:
  GridComponent, GridProcessor

    public class GridJobMetricsProcessor
    extends GridProcessorAdapter

Processes job metrics.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.ignite.internal.GridComponent

`GridComponent.DiscoveryDataExchangeType`

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter

`ctx, log`

### Constructor Summary

Constructors
Constructor and Description
`GridJobMetricsProcessor(GridKernalContext ctx)`

### Method Summary

Methods
`void` `addSnapshot(GridJobMetricsSnapshot metrics)`
`GridJobMetrics` `getJobMetrics()` Gets latest metrics.
`void` `printMemoryStats()` Prints memory statistics (sizes of internal structures, etc.).
`void` `reset()` Resets metrics.
`void` `start(boolean activeOnStart)` Starts grid component.
`void` `stop(boolean cancel)` Stops grid component.

### Methods inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter

`assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStop, onReconnected, toString, validateNode`

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

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

### Constructor Detail

#### GridJobMetricsProcessor

    public GridJobMetricsProcessor(GridKernalContext ctx)

Parameters:
  `ctx` - Grid kernal context.

### Method Detail

#### reset

    public void reset()

Resets metrics.

#### start

    public void start(boolean activeOnStart)
               throws IgniteCheckedException

Starts grid component.

Specified by:
  `start` in interface `GridComponent`
Overrides:
  `start` in class `GridProcessorAdapter`
Throws:
  `IgniteCheckedException` - Throws in case of any errors.

#### stop

    public void stop(boolean cancel)
              throws IgniteCheckedException

Stops grid component.

Specified by:
  `stop` in interface `GridComponent`
Overrides:
  `stop` in class `GridProcessorAdapter`
Parameters:
  `cancel` - If `true`, then all ongoing tasks or jobs for relevant components need to be cancelled.
Throws:
  `IgniteCheckedException` - Thrown in case of any errors.

#### getJobMetrics

    public GridJobMetrics getJobMetrics()

Gets latest metrics.

Returns:
  Latest metrics.

#### addSnapshot

    public void addSnapshot(GridJobMetricsSnapshot metrics)

Parameters:
  `metrics` - New metrics.

#### printMemoryStats

    public void printMemoryStats()

Prints memory statistics (sizes of internal structures, etc.). NOTE: this method is for testing and profiling purposes only.

Specified by:
  `printMemoryStats` in interface `GridComponent`
Overrides:
  `printMemoryStats` in class `GridProcessorAdapter`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

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