org.apache.ignite.spi.discovery.tcp.internal

## Class TcpDiscoveryStatistics

- java.lang.Object
- - org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryStatistics

    public class TcpDiscoveryStatistics
    extends Object

Statistics for `TcpDiscoverySpi`.

### Constructor Summary

Constructors
Constructor and Description
`TcpDiscoveryStatistics()`

### Method Summary

Methods
`int` `ackTimeoutsCount()`
`long` `avgMessageProcessingTime()` Gets average message processing time.
`Map<String,Long>` `avgMessagesSendTimes()` Gets average messages send time (grouped by type).
`void` `clear()` Clears statistics.
`long` `coordinatorSinceTimestamp()` Gets time local node has been coordinator since.
`int` `failedNodesCount()` Gets failed nodes count.
`int` `joinedNodesCount()` Gets nodes joined count.
`long` `joinFinished()`
`long` `joinStarted()`
`int` `leftNodesCount()` Gets nodes left count.
`long` `maxMessageProcessingTime()` Gets max message processing time.
`Map<String,Long>` `maxMessagesSendTimes()` Gets max messages send time (grouped by type).
`String` `maxProcessingTimeMessageClass()` Gets class name of the message took max time to process.
`String` `maxRingDurationMessageClass()` Gets class name of the message that took max time to make full pass.
`long` `maxRingMessageTime()` Gets max time for ring message to make full pass.
`void` `onAckTimeout()` Increments ack timeouts count.
`void` `onBecomingCoordinator()` Initializes coordinator since date (if needed).
`void` `onClientSocketInitialized(long initTime)`
`void` `onJoinFinished()` Initializes join finished timestamp.
`void` `onJoinStarted()` Initializes join started timestamp.
`void` `onMessageProcessingFinished(TcpDiscoveryAbstractMessage msg)` Collects necessary stats for message processed by SPI.
`void` `onMessageProcessingStarted(TcpDiscoveryAbstractMessage msg)` Collects necessary stats for message processed by SPI.
`void` `onMessageReceived(TcpDiscoveryAbstractMessage msg)` Collects necessary stats for message received by SPI.
`void` `onMessageSent(TcpDiscoveryAbstractMessage msg, long time)` Called by coordinator when ring message is sent.
`void` `onNodeFailed()` Increments failed nodes count.
`void` `onNodeJoined()` Increments joined nodes count.
`void` `onNodeLeft()` Increments left nodes count.
`void` `onPendingMessageDiscarded()` Increments pending messages discarded count.
`void` `onPendingMessageRegistered()` Increments pending messages registered count.
`void` `onRingMessageReceived(TcpDiscoveryAbstractMessage msg)` Called by coordinator when ring message makes full pass.
`void` `onServerSocketInitialized(long initTime)`
`void` `onSocketReaderCreated()` Increments socket readers created count.
`void` `onSocketReaderRemoved()` Increments socket readers removed count.
`void` `onSocketTimeout()` Increments socket timeouts count.
`long` `pendingMessagesDiscarded()` Gets pending messages discarded count.
`long` `pendingMessagesRegistered()` Gets pending messages registered count.
`Map<String,Integer>` `processedMessages()` Gets processed messages counts (grouped by type).
`Map<String,Integer>` `receivedMessages()` Gets received messages counts (grouped by type).
`Map<String,Integer>` `sentMessages()`
`int` `socketReadersCreated()` Gets socket readers created count.
`int` `socketReadersRemoved()` Gets socket readers removed count.
`int` `socketTimeoutsCount()`
`String` `toString()`
`int` `totalProcessedMessages()` Gets total processed messages count.
`int` `totalReceivedMessages()` Gets total received messages count.

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

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

### Constructor Detail

#### TcpDiscoveryStatistics

    public TcpDiscoveryStatistics()

### Method Detail

#### onNodeJoined

    public void onNodeJoined()

Increments joined nodes count.

#### onNodeLeft

    public void onNodeLeft()

Increments left nodes count.

#### onNodeFailed

    public void onNodeFailed()

Increments failed nodes count.

#### onAckTimeout

    public void onAckTimeout()

Increments ack timeouts count.

#### onSocketTimeout

    public void onSocketTimeout()

Increments socket timeouts count.

#### onBecomingCoordinator

    public void onBecomingCoordinator()

Initializes coordinator since date (if needed).

#### onJoinStarted

    public void onJoinStarted()

Initializes join started timestamp.

#### onJoinFinished

    public void onJoinFinished()

Initializes join finished timestamp.

#### joinStarted

    public long joinStarted()

Returns:
  Join started timestamp.

#### joinFinished

    public long joinFinished()

Returns:
  Join finished timestamp.

#### onMessageReceived

    public void onMessageReceived(TcpDiscoveryAbstractMessage msg)

Collects necessary stats for message received by SPI.

Parameters:
  `msg` - Received message.

#### onMessageProcessingStarted

    public void onMessageProcessingStarted(TcpDiscoveryAbstractMessage msg)

Collects necessary stats for message processed by SPI.

Parameters:
  `msg` - Processed message.

#### onMessageProcessingFinished

    public void onMessageProcessingFinished(TcpDiscoveryAbstractMessage msg)

Collects necessary stats for message processed by SPI.

Parameters:
  `msg` - Processed message.

#### onMessageSent

    public void onMessageSent(TcpDiscoveryAbstractMessage msg,
                     long time)

Called by coordinator when ring message is sent.

Parameters:
  `msg` - Sent message.
  `time` - Time taken to serialize message.

#### onRingMessageReceived

    public void onRingMessageReceived(TcpDiscoveryAbstractMessage msg)

Called by coordinator when ring message makes full pass.

Parameters:
  `msg` - Message.

#### maxRingMessageTime

    public long maxRingMessageTime()

Gets max time for ring message to make full pass.

Returns:
  Max full pass time.

#### maxRingDurationMessageClass

    public String maxRingDurationMessageClass()

Gets class name of the message that took max time to make full pass.

Returns:
  Message class name.

#### maxProcessingTimeMessageClass

    public String maxProcessingTimeMessageClass()

Gets class name of the message took max time to process.

Returns:
  Message class name.

#### onServerSocketInitialized

    public void onServerSocketInitialized(long initTime)

Parameters:
  `initTime` - Time socket was initialized in.

#### onClientSocketInitialized

    public void onClientSocketInitialized(long initTime)

Parameters:
  `initTime` - Time socket was initialized in.

#### onPendingMessageRegistered

    public void onPendingMessageRegistered()

Increments pending messages registered count.

#### onPendingMessageDiscarded

    public void onPendingMessageDiscarded()

Increments pending messages discarded count.

#### onSocketReaderCreated

    public void onSocketReaderCreated()

Increments socket readers created count.

#### onSocketReaderRemoved

    public void onSocketReaderRemoved()

Increments socket readers removed count.

#### processedMessages

    public Map<String,Integer> processedMessages()

Gets processed messages counts (grouped by type).

Returns:
  Map containing message types and respective counts.

#### receivedMessages

    public Map<String,Integer> receivedMessages()

Gets received messages counts (grouped by type).

Returns:
  Map containing message types and respective counts.

#### sentMessages

    public Map<String,Integer> sentMessages()

Returns:
  Sent messages counts (grouped by type).

#### maxMessagesSendTimes

    public Map<String,Long> maxMessagesSendTimes()

Gets max messages send time (grouped by type).

Returns:
  Map containing messages types and max send times.

#### avgMessagesSendTimes

    public Map<String,Long> avgMessagesSendTimes()

Gets average messages send time (grouped by type).

Returns:
  Map containing messages types and average send times.

#### totalReceivedMessages

    public int totalReceivedMessages()

Gets total received messages count.

Returns:
  Total received messages count.

#### totalProcessedMessages

    public int totalProcessedMessages()

Gets total processed messages count.

Returns:
  Total processed messages count.

#### maxMessageProcessingTime

    public long maxMessageProcessingTime()

Gets max message processing time.

Returns:
  Max message processing time.

#### avgMessageProcessingTime

    public long avgMessageProcessingTime()

Gets average message processing time.

Returns:
  Average message processing time.

#### pendingMessagesRegistered

    public long pendingMessagesRegistered()

Gets pending messages registered count.

Returns:
  Pending messages registered count.

#### pendingMessagesDiscarded

    public long pendingMessagesDiscarded()

Gets pending messages discarded count.

Returns:
  Pending messages registered count.

#### joinedNodesCount

    public int joinedNodesCount()

Gets nodes joined count.

Returns:
  Nodes joined count.

#### leftNodesCount

    public int leftNodesCount()

Gets nodes left count.

Returns:
  Nodes left count.

#### failedNodesCount

    public int failedNodesCount()

Gets failed nodes count.

Returns:
  Failed nodes count.

#### ackTimeoutsCount

    public int ackTimeoutsCount()

Returns:
  Ack timeouts count.

#### socketTimeoutsCount

    public int socketTimeoutsCount()

Returns:
  Socket timeouts count.

#### socketReadersCreated

    public int socketReadersCreated()

Gets socket readers created count.

Returns:
  Socket readers created count.

#### socketReadersRemoved

    public int socketReadersRemoved()

Gets socket readers removed count.

Returns:
  Socket readers removed count.

#### coordinatorSinceTimestamp

    public long coordinatorSinceTimestamp()

Gets time local node has been coordinator since.

Returns:
  Coordinator since timestamp.

#### clear

    public void clear()

Clears statistics.

#### 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