MonitorNode
Date: 2016-02-29

de.zib.scalaris.jmx

## Class MonitorNode

- java.lang.Object
- - de.zib.scalaris.jmx.MonitorNode

- All Implemented Interfaces:
    MonitorNodeMBean

      public class MonitorNode
      extends Object
      implements MonitorNodeMBean

  Provides methods to monitor a specific Scalaris (Erlang) VM via JMX.
  Since:
    3.15
  Version:
    3.15
  Author:
    Nico Kruber, kruber@zib.de

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MonitorNode(String node)` Creates a connection to the erlang VM of the given Scalaris node.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Double` | `getCurLatencyAvg()` Gets the current, i.e.
    `Double` | `getCurLatencyStddev()` Gets the current, i.e.
    `int` | `getDhtNodes()` Gets the number of Scalaris nodes running in the VM the monitor is connected to.
    `String` | `getErlangVersion()` Gets the version of Erlang running in the VM the monitor is connected to.
    `Map<Long,Double>` | `getLatencyAvg()` Gets average latency values collected in the VM the monitor is connected to.
    `Map<Long,Double>` | `getLatencyStddev()` Gets the standard deviation of the latency values collected in the VM the monitor is connected to.
    `String` | `getScalarisVersion()` Gets the version of Scalaris running in the VM the monitor is connected to.

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

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

- - ### Constructor Detail

    - #### MonitorNode

          public MonitorNode(String node)
                      throws ConnectionException

      Creates a connection to the erlang VM of the given Scalaris node. Uses the connection policy of the global connection factory.
      Parameters:
        `node` - Scalaris node to connect with
      Throws:
        `ConnectionException` - if the connection fails or the connection policy is not cloneable

  - ### Method Detail

    - #### getScalarisVersion

          public String getScalarisVersion()
                                    throws ConnectionException,
                                           UnknownException

      Description copied from interface: `MonitorNodeMBean`
      Gets the version of Scalaris running in the VM the monitor is connected to.
      Specified by:
        `getScalarisVersion` in interface `MonitorNodeMBean`
      Returns:
        version string
      Throws:
        `ConnectionException` - if the connection is not active or a communication error occurs or an exit signal was received or the remote node sends a message containing an invalid cookie
        `UnknownException` - if any other error occurs

    - #### getErlangVersion

          public String getErlangVersion()
                                  throws ConnectionException,
                                         UnknownException

      Description copied from interface: `MonitorNodeMBean`
      Gets the version of Erlang running in the VM the monitor is connected to.
      Specified by:
        `getErlangVersion` in interface `MonitorNodeMBean`
      Returns:
        version string
      Throws:
        `ConnectionException` - if the connection is not active or a communication error occurs or an exit signal was received or the remote node sends a message containing an invalid cookie
        `UnknownException` - if any other error occurs

    - #### getDhtNodes

          public int getDhtNodes()
                          throws ConnectionException,
                                 UnknownException

      Description copied from interface: `MonitorNodeMBean`
      Gets the number of Scalaris nodes running in the VM the monitor is connected to.
      Specified by:
        `getDhtNodes` in interface `MonitorNodeMBean`
      Returns:
        number of DHT nodes
      Throws:
        `ConnectionException` - if the connection is not active or a communication error occurs or an exit signal was received or the remote node sends a message containing an invalid cookie
        `UnknownException` - if any other error occurs

    - #### getLatencyAvg

          public Map<Long,Double> getLatencyAvg()
                                         throws ConnectionException,
                                                UnknownException

      Description copied from interface: `MonitorNodeMBean`
      Gets average latency values collected in the VM the monitor is connected to.
      Specified by:
        `getLatencyAvg` in interface `MonitorNodeMBean`
      Returns:
        map of timestamps to average latencies
      Throws:
        `ConnectionException` - if the connection is not active or a communication error occurs or an exit signal was received or the remote node sends a message containing an invalid cookie
        `UnknownException` - if any other error occurs

    - #### getLatencyStddev

          public Map<Long,Double> getLatencyStddev()
                                            throws ConnectionException,
                                                   UnknownException

      Description copied from interface: `MonitorNodeMBean`
      Gets the standard deviation of the latency values collected in the VM the monitor is connected to.
      Specified by:
        `getLatencyStddev` in interface `MonitorNodeMBean`
      Returns:
        map of timestamps to latency (standard) deviation
      Throws:
        `ConnectionException` - if the connection is not active or a communication error occurs or an exit signal was received or the remote node sends a message containing an invalid cookie
        `UnknownException` - if any other error occurs

    - #### getCurLatencyAvg

          public Double getCurLatencyAvg()
                                  throws ConnectionException,
                                         UnknownException

      Description copied from interface: `MonitorNodeMBean`
      Gets the current, i.e. latest, average latency collected in the VM the monitor is connected to.
      Specified by:
        `getCurLatencyAvg` in interface `MonitorNodeMBean`
      Returns:
        latest average latency (or `null` if there is none)
      Throws:
        `ConnectionException` - if the connection is not active or a communication error occurs or an exit signal was received or the remote node sends a message containing an invalid cookie
        `UnknownException` - if any other error occurs

    - #### getCurLatencyStddev

          public Double getCurLatencyStddev()
                                     throws ConnectionException,
                                            UnknownException

      Description copied from interface: `MonitorNodeMBean`
      Gets the current, i.e. latest, standard deviation of the latency collected in the VM the monitor is connected to.
      Specified by:
        `getCurLatencyStddev` in interface `MonitorNodeMBean`
      Returns:
        latest latency (standard) deviation (or `null` if there is none)
      Throws:
        `ConnectionException` - if the connection is not active or a communication error occurs or an exit signal was received or the remote node sends a message containing an invalid cookie
        `UnknownException` - if any other error occurs