org.apache.ignite.spi.communication.tcp

## Interface TcpCommunicationSpiMBean

- All Superinterfaces:
    IgniteSpiManagementMBean

      @MXBeanDescription(value="MBean provide access to TCP-based communication SPI.")
      public interface TcpCommunicationSpiMBean
      extends IgniteSpiManagementMBean

  MBean provide access to TCP-based communication SPI.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `dumpStats()` Dumps SPI per-connection stats to logs.
    `int` | `getAckSendThreshold()` Gets number of received messages per connection to node after which acknowledgment message is sent.
    `int` | `getConnectionsPerNode()` Gets number of connections to each remote node. if `isUsePairedConnections()` is `true` then number of connections is doubled and half is used for incoming and half for outgoing messages.
    `long` | `getConnectTimeout()` Gets connect timeout used when establishing connection with remote nodes.
    `long` | `getIdleConnectionTimeout()` Gets maximum idle connection time upon which idle connections will be closed.
    `String` | `getLocalAddress()` Gets local host address for socket binding.
    `int` | `getLocalPort()` Gets local port for socket binding.
    `int` | `getLocalPortRange()` Gets maximum number of local ports tried if all previously tried ports are occupied.
    `long` | `getMaxConnectTimeout()` Gets maximum connect timeout.
    `int` | `getMessageQueueLimit()` Gets message queue limit for incoming and outgoing messages.
    `int` | `getOutboundMessagesQueueSize()` Gets outbound messages queue size.
    `long` | `getReceivedBytesCount()` Gets received bytes count.
    `Map<UUID,Long>` | `getReceivedMessagesByNode()` Gets received messages counts (grouped by node).
    `Map<String,Long>` | `getReceivedMessagesByType()` Gets received messages counts (grouped by type).
    `int` | `getReceivedMessagesCount()` Gets received messages count.
    `int` | `getReconnectCount()` Gets maximum number of reconnect attempts used when establishing connection with remote nodes.
    `int` | `getSelectorsCount()` Gets count of selectors used in TCP server.
    `long` | `getSelectorSpins()` Defines how many non-blocking `selector.selectNow()` should be made before falling into `selector.select(long)` in NIO server.
    `long` | `getSentBytesCount()` Gets sent bytes count.
    `Map<UUID,Long>` | `getSentMessagesByNode()` Gets sent messages counts (grouped by node).
    `Map<String,Long>` | `getSentMessagesByType()` Gets sent messages counts (grouped by type).
    `int` | `getSentMessagesCount()` Gets sent messages count.
    `int` | `getSharedMemoryPort()` Gets local port for shared memory communication.
    `int` | `getSlowClientQueueLimit()` Gets slow client queue limit.
    `int` | `getSocketReceiveBuffer()` Gets receive buffer size for sockets created or accepted by this SPI.
    `int` | `getSocketSendBuffer()` Gets send buffer size for sockets created or accepted by this SPI.
    `long` | `getSocketWriteTimeout()` Gets socket write timeout for TCP connections.
    `int` | `getUnacknowledgedMessagesBufferSize()` Gets maximum number of stored unacknowledged messages per connection to node.
    `boolean` | `isDirectBuffer()` Gets flag that indicates whether direct or heap allocated buffer is used.
    `boolean` | `isDirectSendBuffer()` Gets flag defining whether direct send buffer should be used.
    `boolean` | `isTcpNoDelay()` Gets value for `TCP_NODELAY` socket option.
    `boolean` | `isUsePairedConnections()` Returns `true` if `TcpCommunicationSpi` should maintain connection for outgoing and incoming messages separately.

    - ### Methods inherited from interface org.apache.ignite.spi.IgniteSpiManagementMBean

      `getIgniteHome, getLocalNodeId, getName, getStartTimestamp, getStartTimestampFormatted, getUpTime, getUpTimeFormatted`

- - ### Method Detail

    - #### getLocalAddress

          @MXBeanDescription(value="Grid node IP address.")
          String getLocalAddress()

      Gets local host address for socket binding. Beside loopback address physical node could have several other ones, but only one is assigned to grid node.
      Returns:
        Grid node IP address.

    - #### getLocalPort

          @MXBeanDescription(value="Port number.")
          int getLocalPort()

      Gets local port for socket binding.
      Returns:
        Port number.

    - #### isUsePairedConnections

          @MXBeanDescription(value="Paired connections used.")
          boolean isUsePairedConnections()

      Returns `true` if `TcpCommunicationSpi` should maintain connection for outgoing and incoming messages separately. In this case total number of connections between local and some remote node is `getConnectionsPerNode()` * 2.

      Returns `false` if each connection of `getConnectionsPerNode()` should be used for outgoing and incoming messages.

      Default is `false`.

      Returns:
        `true` to use paired connections and `false` otherwise.
      See Also:
        `getConnectionsPerNode()`

    - #### getConnectionsPerNode

          @MXBeanDescription(value="Connections per node.")
          int getConnectionsPerNode()

      Gets number of connections to each remote node. if `isUsePairedConnections()` is `true` then number of connections is doubled and half is used for incoming and half for outgoing messages.
      Returns:
        Number of connections per node.
      See Also:
        `isUsePairedConnections()`

    - #### getSharedMemoryPort

          @MXBeanDescription(value="Shared memory endpoint port number.")
          int getSharedMemoryPort()

      Gets local port for shared memory communication.
      Returns:
        Port number.

    - #### getLocalPortRange

          @MXBeanDescription(value="Local port range.")
          int getLocalPortRange()

      Gets maximum number of local ports tried if all previously tried ports are occupied.
      Returns:
        Local port range.

    - #### getIdleConnectionTimeout

          @MXBeanDescription(value="Maximum idle connection time.")
          long getIdleConnectionTimeout()

      Gets maximum idle connection time upon which idle connections will be closed.
      Returns:
        Maximum idle connection time.

    - #### isDirectBuffer

          @MXBeanDescription(value="Flag that indicates whether direct or heap allocated buffer is used.")
          boolean isDirectBuffer()

      Gets flag that indicates whether direct or heap allocated buffer is used.
      Returns:
        Flag that indicates whether direct or heap allocated buffer is used.

    - #### getSelectorsCount

          @MXBeanDescription(value="Count of selectors used in TCP server.")
          int getSelectorsCount()

      Gets count of selectors used in TCP server. Default value equals to the number of CPUs available in the system.
      Returns:
        Count of selectors in TCP server.

    - #### getSentMessagesCount

          @MXBeanDescription(value="Sent messages count.")
          int getSentMessagesCount()

      Gets sent messages count.
      Returns:
        Sent messages count.

    - #### getSentBytesCount

          @MXBeanDescription(value="Sent bytes count.")
          long getSentBytesCount()

      Gets sent bytes count.
      Returns:
        Sent bytes count.

    - #### getReceivedMessagesCount

          @MXBeanDescription(value="Received messages count.")
          int getReceivedMessagesCount()

      Gets received messages count.
      Returns:
        Received messages count.

    - #### getReceivedBytesCount

          @MXBeanDescription(value="Received bytes count.")
          long getReceivedBytesCount()

      Gets received bytes count.
      Returns:
        Received bytes count.

    - #### getReceivedMessagesByType

          @MXBeanDescription(value="Received messages count grouped by message type.")
          Map<String,Long> getReceivedMessagesByType()

      Gets received messages counts (grouped by type).
      Returns:
        Map containing message types and respective counts.

    - #### getReceivedMessagesByNode

          @MXBeanDescription(value="Received messages count grouped by sender node.")
          Map<UUID,Long> getReceivedMessagesByNode()

      Gets received messages counts (grouped by node).
      Returns:
        Map containing sender nodes and respective counts.

    - #### getSentMessagesByType

          @MXBeanDescription(value="Sent messages count grouped by message type.")
          Map<String,Long> getSentMessagesByType()

      Gets sent messages counts (grouped by type).
      Returns:
        Map containing message types and respective counts.

    - #### getSentMessagesByNode

          @MXBeanDescription(value="Sent messages count grouped by receiver node.")
          Map<UUID,Long> getSentMessagesByNode()

      Gets sent messages counts (grouped by node).
      Returns:
        Map containing receiver nodes and respective counts.

    - #### getOutboundMessagesQueueSize

          @MXBeanDescription(value="Outbound messages queue size.")
          int getOutboundMessagesQueueSize()

      Gets outbound messages queue size.
      Returns:
        Outbound messages queue size.

    - #### getConnectTimeout

          @MXBeanDescription(value="Connect timeout.")
          long getConnectTimeout()

      Gets connect timeout used when establishing connection with remote nodes.
      Returns:
        Connect timeout.

    - #### getMaxConnectTimeout

          @MXBeanDescription(value="Maximum connect timeout.")
          long getMaxConnectTimeout()

      Gets maximum connect timeout.
      Returns:
        Maximum connect timeout.

    - #### getReconnectCount

          @MXBeanDescription(value="Reconnect count on connection failure.")
          int getReconnectCount()

      Gets maximum number of reconnect attempts used when establishing connection with remote nodes.
      Returns:
        Reconnects count.

    - #### getSelectorSpins

          @MXBeanDescription(value="Selector thread busy-loop iterations.")
          long getSelectorSpins()

      Defines how many non-blocking `selector.selectNow()` should be made before falling into `selector.select(long)` in NIO server. Long value. Default is `0`. Can be set to `Long.MAX_VALUE` so selector threads will never block.
      Returns:
        Selector thread busy-loop iterations.

    - #### isTcpNoDelay

          @MXBeanDescription(value="TCP_NODELAY socket option value.")
          boolean isTcpNoDelay()

      Gets value for `TCP_NODELAY` socket option.
      Returns:
        `True` if TCP delay is disabled.

    - #### isDirectSendBuffer

          @MXBeanDescription(value="Direct send buffer.")
          boolean isDirectSendBuffer()

      Gets flag defining whether direct send buffer should be used.
      Returns:
        `True` if direct buffers should be used.

    - #### getSocketReceiveBuffer

          @MXBeanDescription(value="Socket receive buffer.")
          int getSocketReceiveBuffer()

      Gets receive buffer size for sockets created or accepted by this SPI.

      If not provided, default is `TcpCommunicationSpi.DFLT_SOCK_BUF_SIZE`.

      Returns:
        Socket receive buffer size.

    - #### getSocketSendBuffer

          @MXBeanDescription(value="Socket send buffer.")
          int getSocketSendBuffer()

      Gets send buffer size for sockets created or accepted by this SPI.

      If not provided, default is `TcpCommunicationSpi.DFLT_SOCK_BUF_SIZE`.

      Returns:
        Socket send buffer size.

    - #### getMessageQueueLimit

          @MXBeanDescription(value="Message queue size limit.")
          int getMessageQueueLimit()

      Gets message queue limit for incoming and outgoing messages.
      Returns:
        Send queue size limit.

    - #### getSocketWriteTimeout

          @MXBeanDescription(value="Socket write timeout.")
          long getSocketWriteTimeout()

      Gets socket write timeout for TCP connections. If message can not be written to socket within this time then connection is closed and reconnect is attempted.
      Returns:
        Socket write timeout for TCP connections.

    - #### getAckSendThreshold

          @MXBeanDescription(value="Number of received messages after which acknowledgment is sent.")
          int getAckSendThreshold()

      Gets number of received messages per connection to node after which acknowledgment message is sent.
      Returns:
        Number of received messages after which acknowledgment is sent.

    - #### getUnacknowledgedMessagesBufferSize

          @MXBeanDescription(value="Maximum number of unacknowledged messages.")
          int getUnacknowledgedMessagesBufferSize()

      Gets maximum number of stored unacknowledged messages per connection to node. If number of unacknowledged messages exceeds this number then connection to node is closed and reconnect is attempted.
      Returns:
        Maximum number of unacknowledged messages.

    - #### getSlowClientQueueLimit

          @MXBeanDescription(value="Slow client queue limit.")
          int getSlowClientQueueLimit()

      Gets slow client queue limit.

      When set to a positive number, communication SPI will monitor clients outbound queue sizes and will drop those clients whose queue exceeded this limit.
      Returns:
        Slow client queue limit.

    - #### dumpStats

          @MXBeanDescription(value="Dumps SPI statistics to logs.")
          void dumpStats()

      Dumps SPI per-connection stats to logs.

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.10.0
Release Date | : March 10 2021