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

com.sleepycat.je.rep

## Class ReplicatedEnvironmentStats

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

- All Implemented Interfaces:
    Serializable

      public class ReplicatedEnvironmentStats
      extends Object
      implements Serializable

  Statistics for a replicated environment.

  The statistics are logically grouped into four categories. Viewing the statistics through `toString()` displays the values in these categories, as does viewing the stats through the RepJEMonitor mbean. Viewing the stats with `toStringVerbose()` will provide more detailed descriptions of the stats and stat categories.

  The current categories are:

  - FeederManager: A feed is the replication stream between a master and replica. The current number of feeders gives a sense of the connectivity of the replication group.
  - BinaryProtocol: These statistics center on the network traffic engendered by the replication stream, and provide a sense of the network bandwidth seen by the replication group.
  - Replay: The act of receiving and applying the replication stream at the Replica node is called Replay. These stats give a sense of how much load the replica node is experiencing when processing the traffic from the replication group.
  - ConsistencyTracker: The tracker is invoked when consistency policies are used at a replica node. This provides a measure of delays experienced by read requests at a replica, in order to conform with the consistency specified by the application.
  See Also:
    Viewing Statistics with JConsole, Serialized Form

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getAckWaitMs()` The total time in milliseconds that the master spent waiting for the `Durability.ReplicaAckPolicy` to be satisfied during successful transaction commits.
    `int` | `getNFeedersCreated()` The number of Feeder threads since this node was started.
    `int` | `getNFeedersShutdown()` The number of Feeder threads that were shut down, either because this node, or the Replica terminated the connection.
    `long` | `getNMaxReplicaLag()` The lag (in VLSNs) associated with the replica that's farthest behind in replaying the replication stream.
    `String` | `getNMaxReplicaLagName()` The name of the replica that's farthest behind in replaying the replication stream.
    `long` | `getNProtocolBytesRead()` The number of bytes of Replication Stream read over the network.
    `long` | `getNProtocolBytesWritten()` The number of Replication Stream bytes written over the network.
    `long` | `getNProtocolEntriesWrittenOldVersion()` Returns the number of messages containing log entries that were written to the replication stream using the previous log format to support replication to a replica running an earlier version during an upgrade.
    `long` | `getNProtocolMessageBatches()` The number of Replication Stream message batches written to the network.
    `long` | `getNProtocolMessagesBatched()` The number of Replication Stream messages that were written as part of a message batch instead of being written individually.
    `long` | `getNProtocolMessagesRead()` The number of Replication Stream messages read over the network.
    `long` | `getNProtocolMessagesWritten()` The total number of Replication Stream messages written over the network.
    `long` | `getNReplayAborts()` The number of abort records which were replayed while the node was in the Replica state.
    `long` | `getNReplayCommitAcks()` The number of commit log records that needed to be acknowledged to the Master by this node when it was a Replica.
    `long` | `getNReplayCommitNoSyncs()` The number of commitNoSync() calls executed when satisfying transaction commit acknowledgment requests from the Master.
    `long` | `getNReplayCommits()` The number of commit log records that were replayed by this node when it was a Replica.
    `long` | `getNReplayCommitSyncs()` The number of commitSync() calls executed when satisfying transaction commit acknowledgment requests from the Master.
    `long` | `getNReplayCommitWriteNoSyncs()` The number of commitNoSync() calls executed when satisfying transaction commit acknowledgment requests from the Master.
    `long` | `getNReplayGroupCommitMaxExceeded()` The number of group commits that were initiated due the `max group size` being exceeded.
    `long` | `getNReplayGroupCommits()` The number of group commit operations.
    `long` | `getNReplayGroupCommitTimeouts()` The number of group commits that were initiated due to the `group timeout interval` being exceeded.
    `long` | `getNReplayGroupCommitTxns()` The number of replay transaction commits that were part of a group commit operation.
    `long` | `getNReplayLNs()` The number of data records (creation, update, deletion) which were replayed while the node was in the Replica state.
    `long` | `getNReplayNameLNs()` The number of NameLN records which were replayed while the node was in the Replica state.
    `long` | `getNTxnsAcked()` The number of transactions that were successfully acknowledged based upon the `Durability.ReplicaAckPolicy` policy associated with the transaction commit.
    `long` | `getNTxnsNotAcked()` The number of transactions that were not acknowledged as required by the `Durability.ReplicaAckPolicy` policy associated with the transaction commit.
    `long` | `getProtocolBytesReadRate()` Bytes read throughput, in terms of bytes received from the replication network channels per second.
    `long` | `getProtocolBytesWriteRate()` Bytes written throughput, in terms of bytes written to the replication network channels per second.
    `long` | `getProtocolMessageReadRate()` Incoming replication message throughput, in terms of messages received from the replication network channels per second.
    `long` | `getProtocolMessageWriteRate()` Outgoing message throughput, in terms of message written to the replication network channels per second.
    `long` | `getProtocolReadNanos()` The number of nanoseconds spent reading from the network channel.
    `long` | `getProtocolWriteNanos()` The number of nanoseconds spent writing to the network channel.
    `long` | `getReplayElapsedTxnTime()` The total elapsed time in milliseconds spent replaying committed and aborted transactions.
    `long` | `getReplayMaxCommitProcessingNanos()` The maximum time taken to replay a transaction commit operation.
    `long` | `getReplayMinCommitProcessingNanos()` The minimum time taken to replay a transaction commit operation.
    `long` | `getReplayTotalCommitProcessingNanos()` The total time spent to replay all commit operations.
    `Map<String,String>` | `getTips()`
    `long` | `getTotalTxnMs()` The total time in milliseconds spent in replicated transactions.
    `long` | `getTrackerLagConsistencyWaitMs()` The total time (in msec) for which a Replica held back a `Environment.beginTransaction(Transaction,TransactionConfig)` operation to satisfy the `TimeConsistencyPolicy`.
    `long` | `getTrackerLagConsistencyWaits()` The number of times a Replica held back a `Environment.beginTransaction(Transaction,TransactionConfig)` operation to satisfy the `TimeConsistencyPolicy`.
    `long` | `getTrackerVLSNConsistencyWaitMs()` The total time (in msec) for which a Replica held back a `Environment.beginTransaction(Transaction,TransactionConfig)` operation to satisfy the `CommitPointConsistencyPolicy`.
    `long` | `getTrackerVLSNConsistencyWaits()` The number of times a Replica held back a `Environment.beginTransaction(Transaction,TransactionConfig)` operation to satisfy the `CommitPointConsistencyPolicy`.
    `String` | `toString()` Returns a string representation of the statistics.
    `String` | `toStringVerbose()`

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

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

- - ### Method Detail

    - #### getNFeedersCreated

          public int getNFeedersCreated()

      The number of Feeder threads since this node was started. A Master supplies the Replication Stream to a Replica via a Feeder thread. The Feeder thread is created when a Replica connects to the node and is shutdown when the connection is terminated.

    - #### getNFeedersShutdown

          public int getNFeedersShutdown()

      The number of Feeder threads that were shut down, either because this node, or the Replica terminated the connection.
      See Also:
        `getNFeedersCreated()`

    - #### getNMaxReplicaLag

          public long getNMaxReplicaLag()

      The lag (in VLSNs) associated with the replica that's farthest behind in replaying the replication stream.

    - #### getNMaxReplicaLagName

          public String getNMaxReplicaLagName()

      The name of the replica that's farthest behind in replaying the replication stream.

    - #### getNTxnsAcked

          public long getNTxnsAcked()

      The number of transactions that were successfully acknowledged based upon the `Durability.ReplicaAckPolicy` policy associated with the transaction commit.

    - #### getNTxnsNotAcked

          public long getNTxnsNotAcked()

      The number of transactions that were not acknowledged as required by the `Durability.ReplicaAckPolicy` policy associated with the transaction commit. These transactions resulted in `InsufficientReplicasException` or `InsufficientAcksException`.

    - #### getTotalTxnMs

          public long getTotalTxnMs()

      The total time in milliseconds spent in replicated transactions. This represents the time from the start of the transaction until its successful commit and acknowledgment. It includes the time spent waiting for transaction commit acknowledgments, as determined by `getAckWaitMs()`.

    - #### getAckWaitMs

          public long getAckWaitMs()

      The total time in milliseconds that the master spent waiting for the `Durability.ReplicaAckPolicy` to be satisfied during successful transaction commits.
      See Also:
        `getTotalTxnMs()`

    - #### getNReplayCommits

          public long getNReplayCommits()

      The number of commit log records that were replayed by this node when it was a Replica. There is one commit record record for each actual commit on the Master.

    - #### getNReplayCommitAcks

          public long getNReplayCommitAcks()

      The number of commit log records that needed to be acknowledged to the Master by this node when it was a Replica. The rate of change of this statistic, will show a strong correlation with that of `NReplayCommits` statistic, if the `Durability` policy used by transactions on the master calls for transaction commit acknowledgments and the Replica is current with respect to the Master.

    - #### getNReplayCommitSyncs

          public long getNReplayCommitSyncs()

      The number of commitSync() calls executed when satisfying transaction commit acknowledgment requests from the Master.

    - #### getNReplayCommitNoSyncs

          public long getNReplayCommitNoSyncs()

      The number of commitNoSync() calls executed when satisfying transaction commit acknowledgment requests from the Master.

    - #### getNReplayCommitWriteNoSyncs

          public long getNReplayCommitWriteNoSyncs()

      The number of commitNoSync() calls executed when satisfying transaction commit acknowledgment requests from the Master.

    - #### getNReplayAborts

          public long getNReplayAborts()

      The number of abort records which were replayed while the node was in the Replica state.

    - #### getNReplayNameLNs

          public long getNReplayNameLNs()

      The number of NameLN records which were replayed while the node was in the Replica state.

    - #### getNReplayLNs

          public long getNReplayLNs()

      The number of data records (creation, update, deletion) which were replayed while the node was in the Replica state.

    - #### getReplayElapsedTxnTime

          public long getReplayElapsedTxnTime()

      The total elapsed time in milliseconds spent replaying committed and aborted transactions.

    - #### getNReplayGroupCommitTimeouts

          public long getNReplayGroupCommitTimeouts()

      The number of group commits that were initiated due to the `group timeout interval` being exceeded.
      Since:
        5.0.76

    - #### getNReplayGroupCommitMaxExceeded

          public long getNReplayGroupCommitMaxExceeded()

      The number of group commits that were initiated due the `max group size` being exceeded.
      Since:
        5.0.76

    - #### getNReplayGroupCommitTxns

          public long getNReplayGroupCommitTxns()

      The number of replay transaction commits that were part of a group commit operation.
      Since:
        5.0.76

    - #### getNReplayGroupCommits

          public long getNReplayGroupCommits()

      The number of group commit operations.
      Since:
        5.0.76

    - #### getReplayMinCommitProcessingNanos

          public long getReplayMinCommitProcessingNanos()

      The minimum time taken to replay a transaction commit operation.

    - #### getReplayMaxCommitProcessingNanos

          public long getReplayMaxCommitProcessingNanos()

      The maximum time taken to replay a transaction commit operation.

    - #### getReplayTotalCommitProcessingNanos

          public long getReplayTotalCommitProcessingNanos()

      The total time spent to replay all commit operations.

    - #### getNProtocolBytesRead

          public long getNProtocolBytesRead()

      The number of bytes of Replication Stream read over the network. It does not include the TCP/IP overhead.

      If the node has served as both a Replica and Master since it was first started, the number represents the sum total of all Feeder related network activity, as well as Replica network activity.

    - #### getNProtocolMessagesRead

          public long getNProtocolMessagesRead()

      The number of Replication Stream messages read over the network.

      If the node has served as both a Replica and Master since it was first started, the number represents the sum total of all Feeder related network activity, as well as Replica network activity.

    - #### getNProtocolBytesWritten

          public long getNProtocolBytesWritten()

      The number of Replication Stream bytes written over the network.

      If the node has served as both a Replica and Master since it was first started, the number represents the sum total of all Feeder related network activity, as well as Replica network activity.

    - #### getNProtocolMessagesBatched

          public long getNProtocolMessagesBatched()

      The number of Replication Stream messages that were written as part of a message batch instead of being written individually. It represents a subset of the messages returned by `getNProtocolMessagesWritten()`
      Since:
        6.2.7
      See Also:
        `getNProtocolMessageBatches()`

    - #### getNProtocolMessageBatches

          public long getNProtocolMessageBatches()

      The number of Replication Stream message batches written to the network.
      Since:
        6.2.7
      See Also:
        `getNProtocolMessagesBatched()`

    - #### getNProtocolMessagesWritten

          public long getNProtocolMessagesWritten()

      The total number of Replication Stream messages written over the network.

      If the node has served as both a Replica and Master since it was first started, the number represents the sum total of all Feeder related network activity, as well as Replica network activity.

    - #### getProtocolReadNanos

          public long getProtocolReadNanos()

      The number of nanoseconds spent reading from the network channel.

      If the node has served as both a Replica and Master since it was first started, the number represents the sum total of all Feeder related network activity, as well as Replica network activity.

    - #### getProtocolWriteNanos

          public long getProtocolWriteNanos()

      The number of nanoseconds spent writing to the network channel.

      If the node has served as both a Replica and Master since it was first started, the number represents the sum total of all Feeder related network activity, as well as Replica network activity.

    - #### getProtocolMessageReadRate

          public long getProtocolMessageReadRate()

      Incoming replication message throughput, in terms of messages received from the replication network channels per second.

      If the node has served as both a Replica and Master since it was first started, the number represents the message reading rate over all Feeder related network activity, as well as Replica network activity.

    - #### getProtocolMessageWriteRate

          public long getProtocolMessageWriteRate()

      Outgoing message throughput, in terms of message written to the replication network channels per second.

      If the node has served as both a Replica and Master since it was first started, the number represents the message writing rate over all Feeder related network activity, as well as Replica network activity.

    - #### getProtocolBytesReadRate

          public long getProtocolBytesReadRate()

      Bytes read throughput, in terms of bytes received from the replication network channels per second.

      If the node has served as both a Replica and Master since it was first started, the number represents the bytes reading rate over all Feeder related network activity, as well as Replica network activity.

    - #### getProtocolBytesWriteRate

          public long getProtocolBytesWriteRate()

      Bytes written throughput, in terms of bytes written to the replication network channels per second.

      If the node has served as both a Replica and Master since it was first started, the number represents the bytes writing rate over all Feeder related network activity, as well as Replica network activity.

    - #### getNProtocolEntriesWrittenOldVersion

          public long getNProtocolEntriesWrittenOldVersion()

      Returns the number of messages containing log entries that were written to the replication stream using the previous log format to support replication to a replica running an earlier version during an upgrade.

    - #### getTrackerLagConsistencyWaits

          public long getTrackerLagConsistencyWaits()

      The number of times a Replica held back a `Environment.beginTransaction(Transaction,TransactionConfig)` operation to satisfy the `TimeConsistencyPolicy`.

    - #### getTrackerLagConsistencyWaitMs

          public long getTrackerLagConsistencyWaitMs()

      The total time (in msec) for which a Replica held back a `Environment.beginTransaction(Transaction,TransactionConfig)` operation to satisfy the `TimeConsistencyPolicy`.

    - #### getTrackerVLSNConsistencyWaits

          public long getTrackerVLSNConsistencyWaits()

      The number of times a Replica held back a `Environment.beginTransaction(Transaction,TransactionConfig)` operation to satisfy the `CommitPointConsistencyPolicy`.

    - #### getTrackerVLSNConsistencyWaitMs

          public long getTrackerVLSNConsistencyWaitMs()

      The total time (in msec) for which a Replica held back a `Environment.beginTransaction(Transaction,TransactionConfig)` operation to satisfy the `CommitPointConsistencyPolicy`.

    - #### toString

          public String toString()

      Returns a string representation of the statistics.
      Overrides:
        `toString` in class `Object`

    - #### toStringVerbose

          public String toStringVerbose()

    - #### getTips

          public Map<String,String> getTips()

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