Berkeley DB version 4.6.21

## com.sleepycat.db
Class ReplicationHostAddress

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

    public class ReplicationHostAddress

extends 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 `EnvironmentConfig.replicationManagerAddRemoteSite` and the `EnvironmentConfig.setReplicationManagerLocalSite` methods.

Field Summary
`int` `eid` The identifier assigned to this host..
`String` `host` The name component of the site address.
`boolean` `isPeer` This field is used to define if the HostAddress refers to a peer of the current site, or not.
`int` `port` The network port component of the site address.

Constructor Summary
`ReplicationHostAddress()` Create a ReplicationHostAddress with default settings.
`ReplicationHostAddress(String host, int port)` Create a ReplicationHostAddress.
`ReplicationHostAddress(String host, int port, boolean isPeer)` Create a ReplicationHostAddress.
`ReplicationHostAddress(String host, int port, boolean isPeer, boolean isConnected)` Create a ReplicationHostAddress.

Method Summary
`boolean` `isConnected()` Indicates whether the address is connected.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### port

    public int port

  The network port component of the site address.

### host

    public String host

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

### eid

    public int eid

  The identifier assigned to this host..

### isPeer

    public boolean isPeer

  This field is used to define if the HostAddress refers to a peer of the current site, or not. The default is false.

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(String host,
                                  int port)

  Create a ReplicationHostAddress.

  Parameters:
    `host` - A string representation of the hostname this address refers to.
    `port` - The port number the address will refer to.

### ReplicationHostAddress

    public ReplicationHostAddress(String host,
                                  int port,
                                  boolean isPeer)

  Create a ReplicationHostAddress.

  Parameters:
    `host` - A string representation of the hostname this address refers to.
    `port` - The port number the address will refer to.
    `isPeer` - Explicitly specify that this address refers to a replication site that is a peer of the current site.

### ReplicationHostAddress

    public ReplicationHostAddress(String host,
                                  int port,
                                  boolean isPeer,
                                  boolean isConnected)

  Create a ReplicationHostAddress.

  Parameters:
    `host` - A string representation of the hostname this address refers to.
    `port` - The port number the address will refer to.
    `isPeer` - Explicitly specify that this address refers to a replication site that is a peer of the current site.
    `isConnected` - Specify that this address is connected

Method Detail

### isConnected

    public boolean isConnected()

  Indicates whether the address is connected.

Berkeley DB version 4.6.21

Copyright (c) 1996,2007 Oracle. All rights reserved.