ReplicationStats (Oracle - Berkeley DB Java API)
Date: 2017-04-13

com.sleepycat.db

## Class ReplicationStats

- java.lang.Object
- - com.sleepycat.db.ReplicationStats

-     public class ReplicationStats
      extends java.lang.Object

  Replication statistics for a database environment.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `REP_CLIENT` The environment is configured as a replication client, as reported by `getStatus()`.
    `static int` | `REP_MASTER` The environment is configured as a replication master, as reported by `getStatus()`.
    `static int` | `REP_NONE` Replication is not configured for this environment, as reported by `getStatus()`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getBulkFills()` The number of times the bulk buffer filled up, forcing the buffer content to be sent.
    `long` | `getBulkOverflows()` The number of times a record was bigger than the entire bulk buffer, and therefore had to be sent as a singleton.
    `long` | `getBulkRecords()` The number of records added to a bulk buffer.
    `long` | `getBulkTransfers()` The number of bulk buffers transferred (via a call to the application's `ReplicationTransport` function).
    `long` | `getClientRerequests()` The number of times this client site received a "re-request" message, indicating that a request it previously sent to another client could not be serviced by that client.
    `long` | `getClientSvcMiss()` The number of "request" type messages received by this client that could not be processed, forcing the originating requester to try sending the request to the master (or another client).
    `long` | `getClientSvcReq()` The number of "request" type messages received by this client.
    `int` | `getDupmasters()` The number of duplicate master conditions originally detected at this site.
    `int` | `getEgen()` The election generation number for the current or next election.
    `long` | `getElectionCurWinner()` The environment ID of the winner of the current or last election.
    `int` | `getElectionDatagen()` The master data generation number of the winner of the current or last election.
    `int` | `getElectionGen()` The master generation number of the winner of the current or last election.
    `LogSequenceNumber` | `getElectionLsn()` The maximum LSN of the winner of the current or last election.
    `int` | `getElectionNumSites()` The number of sites responding to this site during the current election.
    `int` | `getElectionNumVotes()` The number of votes required in the current or last election.
    `int` | `getElectionPriority()` The priority of the winner of the current or last election.
    `long` | `getElections()` The number of elections held.
    `int` | `getElectionSec()` The number of seconds the last election took (the total election time is this value plus `getElectionUsec()`).
    `int` | `getElectionStatus()` The current election phase (0 if no election is in progress).
    `long` | `getElectionsWon()` The number of elections won.
    `int` | `getElectionTiebreaker()` The tiebreaker value of the winner of the current or last election.
    `int` | `getElectionUsec()` The number of microseconds the last election took (the total election time is this value plus `getElectionSec()`).
    `int` | `getElectionVotes()` The number of votes received during the current election.
    `long` | `getEnvId()` The current environment ID.
    `int` | `getEnvPriority()` The current environment priority.
    `long` | `getExtDuplicated()` The number of duplicate external file messages.
    `long` | `getExtRecords()` The number of external file messages.
    `long` | `getExtRereq()` The number of re-requested external file messages.
    `long` | `getExtUpdateRereq()` The number of re-requested external file update messages.
    `int` | `getGen()` The current master generation number.
    `long` | `getLeaseChk()` The number of lease validity checks.
    `long` | `getLeaseChkMisses()` The number of invalid lease validity checks.
    `long` | `getLeaseChkRefresh()` The number of lease refresh attempts during lease validity checks.
    `long` | `getLeaseSends()` The number of live messages sent while using leases.
    `long` | `getLogDuplicated()` The number of duplicate log records received.
    `long` | `getLogQueued()` The number of log records currently queued.
    `long` | `getLogQueuedMax()` The maximum number of log records ever queued at once.
    `long` | `getLogQueuedTotal()` The total number of log records queued.
    `long` | `getLogRecords()` The number of log records received and appended to the log.
    `long` | `getLogRequested()` The number of times log records were missed and requested.
    `long` | `getMaster()` The current master environment ID.
    `long` | `getMasterChanges()` The number of times the master has changed.
    `int` | `getMaxLeaseSec()` The number of seconds of the longest lease (the total lease time is this value plus `getMaxLeaseUsec()`).
    `int` | `getMaxLeaseUsec()` The number of microseconds of the longest lease (the total lease time is this value plus `getMaxLeaseSec()`).
    `LogSequenceNumber` | `getMaxPermLsn()` The LSN of the maximum permanent log record, or 0 if there are no permanent log records.
    `long` | `getMsgsBadgen()` The number of messages received with a bad generation number.
    `long` | `getMsgsProcessed()` The number of messages received and processed.
    `long` | `getMsgsRecover()` The number of messages ignored due to pending recovery.
    `long` | `getMsgsSendFailures()` The number of failed message sends.
    `long` | `getMsgsSent()` The number of messages sent.
    `long` | `getNewsites()` The number of new site messages received.
    `LogSequenceNumber` | `getNextLsn()` In replication environments configured as masters, the next LSN to be used.
    `int` | `getNextPages()` The next page number we expect to receive.
    `int` | `getNumSites()` The number of sites used in the last election.
    `long` | `getNumThrottles()` Transmission limited.
    `long` | `getOutdated()` The number of outdated conditions detected.
    `long` | `getPagesDuplicated()` The number of duplicate pages received.
    `long` | `getPagesRecords()` The number of pages received and stored.
    `long` | `getPagesRequested()` The number of pages missed and requested from the master.
    `long` | `getStartSyncDelayed()` The number of times the client had to delay the start of a cache flush operation (initiated by the master for an impending checkpoint) because it was missing some previous log record(s).
    `boolean` | `getStartupComplete()` The client site has completed its startup procedures and is now handling live records from the master.
    `int` | `getStatus()` The current replication mode.
    `long` | `getTxnsApplied()` The number of transactions applied.
    `boolean` | `getView()` True if the site is a view and false if not.
    `LogSequenceNumber` | `getWaitingLsn()` The LSN of the first log record we have after missing log records being waited for, or 0 if no log records are currently missing.
    `int` | `getWaitingPages()` The page number of the first page we have after missing pages being waited for, or 0 if no pages are currently missing.
    `java.lang.String` | `toString()` For convenience, the ReplicationStats class has a toString method that lists all the data fields.

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

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

- - ### Field Detail

    - #### REP_CLIENT

          public static final int REP_CLIENT

      The environment is configured as a replication client, as reported by `getStatus()`.
      See Also:
        Constant Field Values

    - #### REP_MASTER

          public static final int REP_MASTER

      The environment is configured as a replication master, as reported by `getStatus()`.
      See Also:
        Constant Field Values

    - #### REP_NONE

          public static final int REP_NONE

      Replication is not configured for this environment, as reported by `getStatus()`.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getStartupComplete

          public boolean getStartupComplete()

      The client site has completed its startup procedures and is now handling live records from the master.
      Returns:
        true if the client site has completed its startup procedures

    - #### getView

          public boolean getView()

      True if the site is a view and false if not.
      Returns:
        true if the site is a view

    - #### getLogQueued

          public long getLogQueued()

      The number of log records currently queued.
      Returns:
        the number of log records currently queued

    - #### getStatus

          public int getStatus()

      The current replication mode. Set to one of `REP_MASTER`, `REP_CLIENT` or `REP_NONE`.
      Returns:
        the current replication mode

    - #### getNextLsn

          public LogSequenceNumber getNextLsn()

      In replication environments configured as masters, the next LSN to be used. In replication environments configured as clients, the next LSN expected.
      Returns:
        the next LSN

    - #### getWaitingLsn

          public LogSequenceNumber getWaitingLsn()

      The LSN of the first log record we have after missing log records being waited for, or 0 if no log records are currently missing.
      Returns:
        the LSN of the first log record we have after missing log records being waited for, or 0 if no log records are currently missing

    - #### getMaxPermLsn

          public LogSequenceNumber getMaxPermLsn()

      The LSN of the maximum permanent log record, or 0 if there are no permanent log records.
      Returns:
        the LSN of the maximum permanent log record, or 0 if there are no permanent log records

    - #### getNextPages

          public int getNextPages()

      The next page number we expect to receive.
      Returns:
        the next page number we expect to receive

    - #### getWaitingPages

          public int getWaitingPages()

      The page number of the first page we have after missing pages being waited for, or 0 if no pages are currently missing.
      Returns:
        the page number of the first page we have after missing pages being waited for, or 0 if no pages are currently missing

    - #### getDupmasters

          public int getDupmasters()

      The number of duplicate master conditions originally detected at this site.
      Returns:
        the number of duplicate master conditions originally detected at this site

    - #### getEnvId

          public long getEnvId()

      The current environment ID.
      Returns:
        the current environment ID

    - #### getEnvPriority

          public int getEnvPriority()

      The current environment priority.
      Returns:
        the current environment priority

    - #### getExtDuplicated

          public long getExtDuplicated()

      The number of duplicate external file messages.
      Returns:
        the number of duplicate external file messages

    - #### getExtRecords

          public long getExtRecords()

      The number of external file messages.
      Returns:
        the number of external file messages

    - #### getExtRereq

          public long getExtRereq()

      The number of re-requested external file messages.
      Returns:
        the number of re-requested external file messages

    - #### getExtUpdateRereq

          public long getExtUpdateRereq()

      The number of re-requested external file update messages.
      Returns:
        the number of re-requested external file update messages

    - #### getBulkFills

          public long getBulkFills()

      The number of times the bulk buffer filled up, forcing the buffer content to be sent.
      Returns:
        the number of times the bulk buffer filled up, forcing the buffer content to be sent

    - #### getBulkOverflows

          public long getBulkOverflows()

      The number of times a record was bigger than the entire bulk buffer, and therefore had to be sent as a singleton.
      Returns:
        The number of times a record was bigger than the entire bulk buffer, and therefore had to be sent as a singleton

    - #### getBulkRecords

          public long getBulkRecords()

      The number of records added to a bulk buffer.
      Returns:
        the number of records added to a bulk buffer

    - #### getBulkTransfers

          public long getBulkTransfers()

      The number of bulk buffers transferred (via a call to the application's `ReplicationTransport` function).
      Returns:
        the number of bulk buffers transferred

    - #### getClientRerequests

          public long getClientRerequests()

      The number of times this client site received a "re-request" message, indicating that a request it previously sent to another client could not be serviced by that client. (Compare to `getClientSvcMiss()`.)
      Returns:
        the number of times this client site received a re-request message

    - #### getClientSvcReq

          public long getClientSvcReq()

      The number of "request" type messages received by this client. ("Request" messages are usually sent from a client to the master, but a message passed with the anywhere parameter set to true in the invocation of the application's `ReplicationTransport.send()` function may be sent to another client instead.)
      Returns:
        the number of "request" type messages received by this client

    - #### getClientSvcMiss

          public long getClientSvcMiss()

      The number of "request" type messages received by this client that could not be processed, forcing the originating requester to try sending the request to the master (or another client).
      Returns:
        the number of "request" type messages received by this client that could not be processed

    - #### getGen

          public int getGen()

      The current master generation number.
      Returns:
        the current master generation number

    - #### getEgen

          public int getEgen()

      The election generation number for the current or next election.
      Returns:
        the election generation number for the current or next election

    - #### getLeaseChk

          public long getLeaseChk()

      The number of lease validity checks.
      Returns:
        the number of lease validity checks

    - #### getLeaseChkMisses

          public long getLeaseChkMisses()

      The number of invalid lease validity checks.
      Returns:
        the number of invalid lease validity checks

    - #### getLeaseChkRefresh

          public long getLeaseChkRefresh()

      The number of lease refresh attempts during lease validity checks.
      Returns:
        the number of lease refresh attempts during lease validity checks

    - #### getLeaseSends

          public long getLeaseSends()

      The number of live messages sent while using leases.
      Returns:
        the number of live messages sent while using leases

    - #### getLogDuplicated

          public long getLogDuplicated()

      The number of duplicate log records received.
      Returns:
        the number of duplicate log records received

    - #### getLogQueuedMax

          public long getLogQueuedMax()

      The maximum number of log records ever queued at once.
      Returns:
        the maximum number of log records ever queued at once

    - #### getLogQueuedTotal

          public long getLogQueuedTotal()

      The total number of log records queued.
      Returns:
        the total number of log records queued

    - #### getLogRecords

          public long getLogRecords()

      The number of log records received and appended to the log.
      Returns:
        the number of log records received and appended to the log

    - #### getLogRequested

          public long getLogRequested()

      The number of times log records were missed and requested.
      Returns:
        the number of times log records were missed and requested

    - #### getMaster

          public long getMaster()

      The current master environment ID.
      Returns:
        the current master environment ID

    - #### getMasterChanges

          public long getMasterChanges()

      The number of times the master has changed.
      Returns:
        the number of times the master has changed

    - #### getMsgsBadgen

          public long getMsgsBadgen()

      The number of messages received with a bad generation number.
      Returns:
        the number of messages received with a bad generation number

    - #### getMsgsProcessed

          public long getMsgsProcessed()

      The number of messages received and processed.
      Returns:
        the number of messages received and processed

    - #### getMsgsRecover

          public long getMsgsRecover()

      The number of messages ignored due to pending recovery.
      Returns:
        the number of messages ignored due to pending recovery

    - #### getMsgsSendFailures

          public long getMsgsSendFailures()

      The number of failed message sends.
      Returns:
        the number of failed message sends

    - #### getMsgsSent

          public long getMsgsSent()

      The number of messages sent.
      Returns:
        the number of messages sent

    - #### getNewsites

          public long getNewsites()

      The number of new site messages received.
      Returns:
        the number of new site messages received

    - #### getNumSites

          public int getNumSites()

      The number of sites used in the last election.
      Returns:
        the number of sites used in the last election

    - #### getNumThrottles

          public long getNumThrottles()

      Transmission limited. This indicates the number of times that data transmission was stopped to limit the amount of data sent in response to a single call to `Environment.processReplicationMessage`.
      Returns:
        the number of times that data transmission was stopped to limit the amount of data sent

    - #### getOutdated

          public long getOutdated()

      The number of outdated conditions detected.
      Returns:
        the number of outdated conditions detected

    - #### getPagesDuplicated

          public long getPagesDuplicated()

      The number of duplicate pages received.
      Returns:
        the number of duplicate pages received

    - #### getPagesRecords

          public long getPagesRecords()

      The number of pages received and stored.
      Returns:
        the number of pages received and stored

    - #### getPagesRequested

          public long getPagesRequested()

      The number of pages missed and requested from the master.
      Returns:
        the number of pages missed and requested from the master

    - #### getTxnsApplied

          public long getTxnsApplied()

      The number of transactions applied.
      Returns:
        the number of transactions applied

    - #### getStartSyncDelayed

          public long getStartSyncDelayed()

      The number of times the client had to delay the start of a cache flush operation (initiated by the master for an impending checkpoint) because it was missing some previous log record(s).
      Returns:
        the number of times the client had to delay the start of a cache flush operation (initiated by the master for an impending checkpoint) because it was missing some previous log record(s)

    - #### getElections

          public long getElections()

      The number of elections held.
      Returns:
        the number of elections held

    - #### getElectionsWon

          public long getElectionsWon()

      The number of elections won.
      Returns:
        the number of elections won

    - #### getElectionCurWinner

          public long getElectionCurWinner()

      The environment ID of the winner of the current or last election.
      Returns:
        the environment ID of the winner of the current or last election

    - #### getElectionGen

          public int getElectionGen()

      The master generation number of the winner of the current or last election.
      Returns:
        the master generation number of the winner of the current or last election

    - #### getElectionDatagen

          public int getElectionDatagen()

      The master data generation number of the winner of the current or last election.
      Returns:
        the master data generation number of the winner of the current or last election

    - #### getElectionLsn

          public LogSequenceNumber getElectionLsn()

      The maximum LSN of the winner of the current or last election.
      Returns:
        the maximum LSN of the winner of the current or last election

    - #### getElectionNumSites

          public int getElectionNumSites()

      The number of sites responding to this site during the current election.
      Returns:
        the number of sites responding to this site during the current election

    - #### getElectionNumVotes

          public int getElectionNumVotes()

      The number of votes required in the current or last election.
      Returns:
        the number of votes required in the current or last election

    - #### getElectionPriority

          public int getElectionPriority()

      The priority of the winner of the current or last election.
      Returns:
        the priority of the winner of the current or last election

    - #### getElectionStatus

          public int getElectionStatus()

      The current election phase (0 if no election is in progress).
      Returns:
        the current election phase

    - #### getElectionTiebreaker

          public int getElectionTiebreaker()

      The tiebreaker value of the winner of the current or last election.
      Returns:
        the tiebreaker value of the winner of the current or last election

    - #### getElectionVotes

          public int getElectionVotes()

      The number of votes received during the current election.
      Returns:
        the number of votes received during the current election

    - #### getElectionSec

          public int getElectionSec()

      The number of seconds the last election took (the total election time is this value plus `getElectionUsec()`).
      Returns:
        the number of seconds the last election took

    - #### getElectionUsec

          public int getElectionUsec()

      The number of microseconds the last election took (the total election time is this value plus `getElectionSec()`).
      Returns:
        the number of microseconds the last election took

    - #### getMaxLeaseSec

          public int getMaxLeaseSec()

      The number of seconds of the longest lease (the total lease time is this value plus `getMaxLeaseUsec()`).
      Returns:
        the number of seconds of the longest lease

    - #### getMaxLeaseUsec

          public int getMaxLeaseUsec()

      The number of microseconds of the longest lease (the total lease time is this value plus `getMaxLeaseSec()`).
      Returns:
        the number of microseconds of the longest lease

    - #### toString

          public java.lang.String toString()

      For convenience, the ReplicationStats class has a toString method that lists all the data fields.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        a String that lists all the data fields

Copyright (c) 1996, 2017 Oracle and/or its affiliates. All rights reserved.