com.sleepycat.db

## Class ReplicationHostAddress

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

-     public class ReplicationHostAddress
      extends java.lang.Object

  A simple wrapper class to hold information needed to define a host in a replication group.

  The ReplicationHostAddress can be used to refer to the current site, or to a remote site in the replication group.

  Used in the `ReplicationManagerSiteConfig.setAddress`, `ReplicationManagerSiteConfig.getAddress` and the `ReplicationManagerSite.getAddress` methods.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.lang.String` | `host` The name component of the site address.
    `int` | `port` The network port component of the site address.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReplicationHostAddress()` Create a ReplicationHostAddress with default settings.
    `ReplicationHostAddress(java.lang.String host, int port)` Create a ReplicationHostAddress with user defined host and port information.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object o)`
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### port

          public int port

      The network port component of the site address.

    - #### host

          public java.lang.String host

      The name component of the site address. Can be a fully qualified name, or a dotted format address in String format.

  - ### Constructor Detail

    - #### ReplicationHostAddress

          public ReplicationHostAddress()

      Create a ReplicationHostAddress with default settings.

      This is likely not what you want. The current default is host: localhost and port 0.

      Only use this constructor if you plan to configure the object fields manually after construction.

    - #### ReplicationHostAddress

          public ReplicationHostAddress(java.lang.String host,
                                        int port)

      Create a ReplicationHostAddress with user defined host and port information.
      Parameters:
        `host` - the host name
        `port` - the port

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

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