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

com.sleepycat.je.rep.util

## Class DbPing

- java.lang.Object
- - com.sleepycat.je.rep.util.DbPing

-     public class DbPing
      extends Object

  This class provides the utility to request the current state of a replica in a JE replication group, see more details in `NodeState`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DbPing(ReplicationNode repNode, String groupName, int socketTimeout)` Create a DbPing instance for programmatic use.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `NodeState` | `getNodeState()`
    `static void` | `main(String[] args)` Usage:

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

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

- - ### Constructor Detail

    - #### DbPing

          public DbPing(ReplicationNode repNode,
                String groupName,
                int socketTimeout)

      Create a DbPing instance for programmatic use.
      Parameters:
        `repNode` - a class that implements `ReplicationNode`
        `groupName` - name of the group which the node joins
        `socketTimeout` - timeout value for creating a socket connection with the node

  - ### Method Detail

    - #### main

          public static void main(String[] args)
                           throws Exception

      Usage:

           java {com.sleepycat.je.rep.util.DbPing |
                 -jar je-<version>.jar DbPing}
             -nodeName <node name> # name of the node whose state is
                                         # requested
             -groupName <group name> # name of the group which the node joins
             -nodeHost <host:port> # the host name and port pair the node
                                         # used to join the group
             -socketTimeout              # the timeout value for creating a
                                         # socket connection with the node,
                                         # default is 10 seconds if not set

      Throws:
        `Exception`

    - #### getNodeState

          public NodeState getNodeState()
                                 throws IOException,
                                        com.sleepycat.je.rep.utilint.ServiceDispatcher.ServiceConnectFailedException

      Throws:
        `IOException`
        `com.sleepycat.je.rep.utilint.ServiceDispatcher.ServiceConnectFailedException`

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