Interface TcpCommunicationSpiMBean

    • Method Detail

      • getLocalAddress

        @MXBeanDescription("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("Port number.")
        int getLocalPort()
        Gets local port for socket binding.
        Returns:
        Port number.
      • isUsePairedConnections

        @MXBeanDescription("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("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("This property will be removed in future releases.")
        @Deprecated
        int getSharedMemoryPort()
        Deprecated.
        This property will be removed in future releases.
        Returns:
        Ignored value.
      • getLocalPortRange

        @MXBeanDescription("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("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("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("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("Sent messages count.")
        int getSentMessagesCount()
        Gets sent messages count.
        Returns:
        Sent messages count.
      • getSentBytesCount

        @MXBeanDescription("Sent bytes count.")
        long getSentBytesCount()
        Gets sent bytes count.
        Returns:
        Sent bytes count.
      • getReceivedMessagesCount

        @MXBeanDescription("Received messages count.")
        int getReceivedMessagesCount()
        Gets received messages count.
        Returns:
        Received messages count.
      • getReceivedBytesCount

        @MXBeanDescription("Received bytes count.")
        long getReceivedBytesCount()
        Gets received bytes count.
        Returns:
        Received bytes count.
      • getReceivedMessagesByType

        @MXBeanDescription("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("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("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("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("Outbound messages queue size.")
        int getOutboundMessagesQueueSize()
        Gets outbound messages queue size.
        Returns:
        Outbound messages queue size.
      • getConnectTimeout

        @MXBeanDescription("Connect timeout.")
        long getConnectTimeout()
        Gets connect timeout used when establishing connection with remote nodes.
        Returns:
        Connect timeout.
      • getMaxConnectTimeout

        @MXBeanDescription("Maximum connect timeout.")
        long getMaxConnectTimeout()
        Gets maximum connect timeout.
        Returns:
        Maximum connect timeout.
      • getReconnectCount

        @MXBeanDescription("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("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("TCP_NODELAY socket option value.")
        boolean isTcpNoDelay()
        Gets value for TCP_NODELAY socket option.
        Returns:
        True if TCP delay is disabled.
      • isDirectSendBuffer

        @MXBeanDescription("Direct send buffer.")
        boolean isDirectSendBuffer()
        Gets flag defining whether direct send buffer should be used.
        Returns:
        True if direct buffers should be used.
      • getMessageQueueLimit

        @MXBeanDescription("Message queue size limit.")
        int getMessageQueueLimit()
        Gets message queue limit for incoming and outgoing messages.
        Returns:
        Send queue size limit.
      • getSocketWriteTimeout

        @MXBeanDescription("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("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("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("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("Dumps SPI statistics to logs.")
        void dumpStats()
        Dumps SPI per-connection stats to logs.