ReplicationManagerSiteConfig (Oracle - Berkeley DB Java API)
Date: 2020-06-01

Package com.sleepycat.db

## Class ReplicationManagerSiteConfig

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

- All Implemented Interfaces:
    `java.lang.Cloneable`

      public class ReplicationManagerSiteConfig
      extends java.lang.Object
      implements java.lang.Cloneable

  Specifies the attributes of a site in the replication group.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ReplicationManagerSiteConfig()` | An instance created using the default constructor is initialized with the system's default settings.
    `ReplicationManagerSiteConfig​(java.lang.String host, long port)` | Configure the host and port for a site in replication group.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ReplicationHostAddress` | `getAddress()` | Return the address of the site.
    `boolean` | `getBootstrapHelper()` | Return if the site is a helper for the local site.
    `boolean` | `getGroupCreator()` | Return if the site is a group creator.
    `java.lang.String` | `getHost()` | Return the host of the site.
    `boolean` | `getLegacy()` | Return if the site is in a legacy group.
    `boolean` | `getLocalSite()` | Return if the site is the local site.
    `boolean` | `getPeer()` | Return if the site is peer.
    `long` | `getPort()` | Return the port of the site.
    `void` | `setAddress​(ReplicationHostAddress address)` | Configure the address for a site in replication group.
    `void` | `setBootstrapHelper​(boolean helper)` | Set the site to be a helper site.
    `void` | `setGroupCreator​(boolean groupCreator)` | Set the site to be a group creator.
    `void` | `setHost​(java.lang.String host)` | Configure the host of the site.
    `void` | `setLegacy​(boolean legacy)` | Specify the site in a legacy group.
    `void` | `setLocalSite​(boolean localSite)` | Set the site to be the local site.
    `void` | `setPeer​(boolean peer)` | Set the site to be peer to local site.
    `void` | `setPort​(long port)` | Configure the port of the site.

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

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

- - ### Constructor Detail

    - #### ReplicationManagerSiteConfig

          public ReplicationManagerSiteConfig()

      An instance created using the default constructor is initialized with the system's default settings.

    - #### ReplicationManagerSiteConfig

          public ReplicationManagerSiteConfig​(java.lang.String host,
                                              long port)

      Configure the host and port for a site in replication group.
      Parameters:
        `host` - the host name
        `port` - the port

  - ### Method Detail

    - #### setAddress

          public void setAddress​(ReplicationHostAddress address)

      Configure the address for a site in replication group.

      Parameters:
        `address` - the host address

    - #### getAddress

          public ReplicationHostAddress getAddress()

      Return the address of the site.

      Returns:
        the address of the site.

    - #### setHost

          public void setHost​(java.lang.String host)

      Configure the host of the site.

      Parameters:
        `host` - the host name

    - #### getHost

          public java.lang.String getHost()

      Return the host of the site.

      Returns:
        the host of the site.

    - #### setPort

          public void setPort​(long port)

      Configure the port of the site.

      Parameters:
        `port` - the port

    - #### getPort

          public long getPort()

      Return the port of the site.

      Returns:
        the port of the site.

    - #### setBootstrapHelper

          public void setBootstrapHelper​(boolean helper)

      Set the site to be a helper site.

      A remote site may be used as a helper when the local site first joins the replication group. Once the local site has been established as a member of the group, this config setting is ignored.

      Parameters:
        `helper` - if the site is a helper site If true, the site will be a helper.

    - #### getBootstrapHelper

          public boolean getBootstrapHelper()

      Return if the site is a helper for the local site.

      Returns:
        If the site is a helper for the local site.

    - #### setGroupCreator

          public void setGroupCreator​(boolean groupCreator)

      Set the site to be a group creator.

      Only the local site could be applied as a group creator. The group creator would create the initial membership database, defining a replication group of just the one site, rather than trying to join an existing group when it starts for the first time.

      Parameters:
        `groupCreator` - if the site is a group creator If true, set the site a group creator.

    - #### getGroupCreator

          public boolean getGroupCreator()

      Return if the site is a group creator.

      Returns:
        If the the site is a group creator.

    - #### setLegacy

          public void setLegacy​(boolean legacy)

      Specify the site in a legacy group. It would be considered as part of an existing group, upgrading from a previous version of BDB. All sites in the legacy group must specify this for themselves (the local site) and for all other sites initially in the group.

      Parameters:
        `legacy` - if the site is in a legacy group If true, specify the site in a legacy group.

    - #### getLegacy

          public boolean getLegacy()

      Return if the site is in a legacy group.

      Returns:
        If the site is in a legacy group.

    - #### setLocalSite

          public void setLocalSite​(boolean localSite)

      Set the site to be the local site.

      Parameters:
        `localSite` - if the site is a local site If true, it is local site.

    - #### getLocalSite

          public boolean getLocalSite()

      Return if the site is the local site.

      Returns:
        If the site is the local site.

    - #### setPeer

          public void setPeer​(boolean peer)

      Set the site to be peer to local site.

      A peer site may be used as a target for "client-to-client" synchronization messages. It only makes sense to specify this for a remote site.

      Parameters:
        `peer` - if the site is a peer to local site If true, it is peer to loca site.

    - #### getPeer

          public boolean getPeer()

      Return if the site is peer.

      Returns:
        If the site is peer.

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