NodeState (Oracle - Berkeley DB Java Edition API)
Date: 2014-12-16

com.sleepycat.je.rep

## Class NodeState

- java.lang.Object
- - com.sleepycat.je.rep.NodeState

-     public class NodeState
      extends Object

  The current state of a replication node and the application this node is running in.

  This includes the following information:

  - the replication `state` of this node
  - the name of the current master, as known by this node
  - the time when this node joined the replication group
  - the latest transaction end (abort or commit) VLSN on this node
  - the transaction end (abort or commit) VLSN on the master known by this node. The difference between transaction end VLSNs on the master versus on this node gives an indication of how current this node's data is. The gap in VLSN values indicates the number of replication records that must be processed by this node, to be caught up to the master.
  - the number of feeders running on this node
  - the system load average for the last minute
  - The appState field is a byte array meant to hold information generated by the JE HA application, as provided by a registered `AppStateMonitor`. Users are responsible for serializing and deserializing information for this field.
  Since:
    5.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getActiveFeeders()` Returns the number of current active Feeders running on this node.
    `byte[]` | `getAppState()` Returns the application state which is obtained via `AppStateMonitor.getAppState()`.
    `long` | `getCurrentTxnEndVLSN()` Returns the latest transaction end VLSN on this replication node.
    `String` | `getGroupName()` Returns the name of the group which the node joins.
    `JEVersion` | `getJEVersion()` Returns the current JEVersion that this node runs on.
    `long` | `getJoinTime()` Returns the time when this node joins the replication group.
    `long` | `getKnownMasterTxnEndVLSN()` Returns the transaction end VLSN on the master known by this node.
    `int` | `getLogVersion()` Returns the log version of this node.
    `String` | `getMasterName()` Returns the name of the current `master` known by this node.
    `String` | `getNodeName()` Returns the name of the node whose state is requested.
    `ReplicatedEnvironment.State` | `getNodeState()` Returns the replication `state` of this node.
    `double` | `getSystemLoad()` Returns the system load average for the last minute.
    `String` | `toString()`

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

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

- - ### Method Detail

    - #### getNodeName

          public String getNodeName()

      Returns the name of the node whose state is requested.
      Returns:
        the name of the node.

    - #### getGroupName

          public String getGroupName()

      Returns the name of the group which the node joins.
      Returns:
        name of the group which the node joins

    - #### getNodeState

          public ReplicatedEnvironment.State getNodeState()

      Returns the replication `state` of this node.
      Returns:
        the replication state of this node.

    - #### getMasterName

          public String getMasterName()

      Returns the name of the current `master` known by this node.
      Returns:
        the name of the current master

    - #### getJEVersion

          public JEVersion getJEVersion()

      Returns the current JEVersion that this node runs on.
      Returns:
        the current JEVersion used by this node.

    - #### getJoinTime

          public long getJoinTime()

      Returns the time when this node joins the replication group.
      Returns:
        the time when this node joins the group

    - #### getCurrentTxnEndVLSN

          public long getCurrentTxnEndVLSN()

      Returns the latest transaction end VLSN on this replication node.
      Returns:
        the commit VLSN on this node

    - #### getKnownMasterTxnEndVLSN

          public long getKnownMasterTxnEndVLSN()

      Returns the transaction end VLSN on the master known by this node.
      Returns:
        the known commit VLSN on master

    - #### getActiveFeeders

          public int getActiveFeeders()

      Returns the number of current active Feeders running on this node.
      Returns:
        the number of running Feeders on the node

    - #### getLogVersion

          public int getLogVersion()

      Returns the log version of this node.
      Returns:
        the log version of this node.

    - #### getAppState

          public byte[] getAppState()

      Returns the application state which is obtained via `AppStateMonitor.getAppState()`.
      Returns:
        the application state

    - #### getSystemLoad

          public double getSystemLoad()

      Returns the system load average for the last minute.
      Returns:
        the system average load, -1.0 if the node is running on jdk5 or exceptions thrown while getting this information.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright (c) 2004, 2014 Oracle and/or its affiliates. All rights reserved.