org.apache.ignite.internal.processors.streamer

## Class StreamerMBeanAdapter

- java.lang.Object
- - org.apache.ignite.internal.processors.streamer.StreamerMBeanAdapter

All Implemented Interfaces:
  StreamerMBean

    public class StreamerMBeanAdapter
    extends Object
    implements StreamerMBean

Streamer MBean implementation.

### Constructor Summary

Constructors
Constructor and Description
`StreamerMBeanAdapter(IgniteStreamerImpl streamer)`

### Method Summary

Methods
`int` `getBatchFutureMapSize()` Gets size of batch futures map.
`int` `getCurrentActiveSessions()` Gets number of current active sessions.
`int` `getFailuresCount()` Gets number of failures since last reset.
`int` `getMaximumActiveSessions()` Gets maximum number of active sessions since last reset.
`String` `getName()` Gets streamer name.
`int` `getPipelineAverageExecutionNodes()` Gets average number of unique nodes participated in pipeline execution.
`long` `getPipelineAverageExecutionTime()` Gets pipeline average execution time, i.e. time between execution start and time when last stage in pipeline returned empty map.
`int` `getPipelineMaximumExecutionNodes()` Gets maximum number of unique nodes participated in pipeline execution.
`long` `getPipelineMaximumExecutionTime()` Gets pipeline maximum execution time, i.e. time between execution start and time when last stage in pipeline returned empty map.
`int` `getPipelineMinimumExecutionNodes()` Gets minimum number of unique nodes participated in pipeline execution.
`long` `getPipelineMinimumExecutionTime()` Gets pipeline minimum execution time, i.e. time between execution start and time when last stage in pipeline returned empty map.
`int` `getStageActiveExecutionCount()` Gets number of stages currently being executed in streamer pool.
`int` `getStageFutureMapSize()` Gets size of stage futures map.
`long` `getStageTotalExecutionCount()` Gets total number of stages executed since last reset.
`int` `getStageWaitingExecutionCount()` Gets number of event batches currently waiting to be executed.
`boolean` `isAtLeastOnce()` Gets `atLeastOnce` configuration flag.

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

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

### Constructor Detail

#### StreamerMBeanAdapter

    public StreamerMBeanAdapter(IgniteStreamerImpl streamer)

Parameters:
  `streamer` - Streamer.

### Method Detail

#### getName

    @Nullable
    public String getName()

Gets streamer name.

Specified by:
  `getName` in interface `StreamerMBean`
Returns:
  Streamer name.

#### isAtLeastOnce

    public boolean isAtLeastOnce()

Gets `atLeastOnce` configuration flag.

Specified by:
  `isAtLeastOnce` in interface `StreamerMBean`
Returns:
  `True` if `atLeastOnce` is configured.

#### getStageFutureMapSize

    public int getStageFutureMapSize()

Gets size of stage futures map. This map is maintained only when `atLeastOnce` configuration flag is set to true.

Specified by:
  `getStageFutureMapSize` in interface `StreamerMBean`
Returns:
  Stage future map size.

#### getBatchFutureMapSize

    public int getBatchFutureMapSize()

Gets size of batch futures map.

Specified by:
  `getBatchFutureMapSize` in interface `StreamerMBean`
Returns:
  Batch future map size.

#### getStageActiveExecutionCount

    public int getStageActiveExecutionCount()

Gets number of stages currently being executed in streamer pool.

Specified by:
  `getStageActiveExecutionCount` in interface `StreamerMBean`
Returns:
  Number of stages. Cannot be more than pool thread count.

#### getStageWaitingExecutionCount

    public int getStageWaitingExecutionCount()

Gets number of event batches currently waiting to be executed.

Specified by:
  `getStageWaitingExecutionCount` in interface `StreamerMBean`
Returns:
  Number of event batches waiting to be processed.

#### getStageTotalExecutionCount

    public long getStageTotalExecutionCount()

Gets total number of stages executed since last reset.

Specified by:
  `getStageTotalExecutionCount` in interface `StreamerMBean`
Returns:
  Total number of stages executed since last reset.

#### getPipelineMaximumExecutionTime

    public long getPipelineMaximumExecutionTime()

Gets pipeline maximum execution time, i.e. time between execution start and time when last stage in pipeline returned empty map. If pipeline execution was split to different nodes, metrics for each split will be recorded independently.

Specified by:
  `getPipelineMaximumExecutionTime` in interface `StreamerMBean`
Returns:
  Pipeline maximum execution time.

#### getPipelineMinimumExecutionTime

    public long getPipelineMinimumExecutionTime()

Gets pipeline minimum execution time, i.e. time between execution start and time when last stage in pipeline returned empty map. If pipeline execution was split to different nodes, metrics for each split will be recorded independently.

Specified by:
  `getPipelineMinimumExecutionTime` in interface `StreamerMBean`
Returns:
  Pipeline minimum execution time.

#### getPipelineAverageExecutionTime

    public long getPipelineAverageExecutionTime()

Gets pipeline average execution time, i.e. time between execution start and time when last stage in pipeline returned empty map. If pipeline execution was split, metrics for each split will be recorded independently.

Specified by:
  `getPipelineAverageExecutionTime` in interface `StreamerMBean`
Returns:
  Pipeline average execution time.

#### getPipelineMaximumExecutionNodes

    public int getPipelineMaximumExecutionNodes()

Gets maximum number of unique nodes participated in pipeline execution. If pipeline execution was split, metrics for each split will be recorded independently.

Specified by:
  `getPipelineMaximumExecutionNodes` in interface `StreamerMBean`
Returns:
  Maximum number of unique nodes in pipeline execution.

#### getPipelineMinimumExecutionNodes

    public int getPipelineMinimumExecutionNodes()

Gets minimum number of unique nodes participated in pipeline execution. If pipeline execution was split, metrics for each split will be recorded independently.

Specified by:
  `getPipelineMinimumExecutionNodes` in interface `StreamerMBean`
Returns:
  Minimum number of unique nodes in pipeline execution.

#### getPipelineAverageExecutionNodes

    public int getPipelineAverageExecutionNodes()

Gets average number of unique nodes participated in pipeline execution. If pipeline execution was split, metrics for each split will be recorded independently.

Specified by:
  `getPipelineAverageExecutionNodes` in interface `StreamerMBean`
Returns:
  Average number of unique nodes in pipeline execution.

#### getCurrentActiveSessions

    public int getCurrentActiveSessions()

Gets number of current active sessions. Since event execution sessions are tracked only when `atLeastOnce` configuration property is set to `true`, this metric will be collected only in this case. When `atLeastOnce` is set to `false`, this metric will always be zero.

Specified by:
  `getCurrentActiveSessions` in interface `StreamerMBean`
Returns:
  Number of current active sessions.

#### getMaximumActiveSessions

    public int getMaximumActiveSessions()

Gets maximum number of active sessions since last reset. Since event execution sessions are tracked only when `atLeastOnce` configuration property is set to `true`, this metric will be collected only in this case. When `atLeastOnce` is set to `false`, this metric will always be zero.

Specified by:
  `getMaximumActiveSessions` in interface `StreamerMBean`
Returns:
  Maximum active sessions since last reset.

#### getFailuresCount

    public int getFailuresCount()

Gets number of failures since last reset. If `atLeastOnce` flag is set to steamer configuration, then only root node failures will be counted. Otherwise each node will count failures independently.

Specified by:
  `getFailuresCount` in interface `StreamerMBean`
Returns:
  Failures count.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC3
Release Date | : March 24 2015