Berkeley DB
version 5.3.21

com.sleepycat.db
Class ReplicationManagerSite

java.lang.Object
  extended by com.sleepycat.db.ReplicationManagerSite

public class ReplicationManagerSite
extends Object

A ReplicationManagerSite handle is used to manage a site in a replication group. ReplicationManagerSite handles are opened using the Environment.getReplicationManagerSite method.


Method Summary
 void close()
          Close the site.
 ReplicationHostAddress getAddress()
          Get the address of the site.
 boolean getBootstrapHelper()
          Return if the site is a helper for the local site.
 ReplicationManagerSiteConfig getConfig()
          Get the address and configuration of the site.
 int getEid()
          Get the environment id of the site.
 boolean getGroupCreator()
          Return if the site is a group creator.
 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 to local site.
 void remove()
          Remove the site.
 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 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

close

public void close()
           throws DatabaseException
Close the site.

Throws:
DatabaseException

getAddress

public ReplicationHostAddress getAddress()
                                  throws DatabaseException
Get the address of the site.

Returns:
the address of the site.
Throws:
DatabaseException

getConfig

public ReplicationManagerSiteConfig getConfig()
                                       throws DatabaseException
Get the address and configuration of the site.

Returns:
the configuration of the site.
Throws:
DatabaseException

getEid

public int getEid()
           throws DatabaseException
Get the environment id of the site.

Returns:
the environment id of the site.
Throws:
DatabaseException

setBootstrapHelper

public void setBootstrapHelper(boolean helper)
                        throws DatabaseException
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 true, the site will be a helper.
Throws:
DatabaseException

getBootstrapHelper

public boolean getBootstrapHelper()
                           throws DatabaseException
Return if the site is a helper for the local site.

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

setGroupCreator

public void setGroupCreator(boolean groupCreator)
                     throws DatabaseException
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 true, set the site to be a group creator.
Throws:
DatabaseException

getGroupCreator

public boolean getGroupCreator()
                        throws DatabaseException
Return if the site is a group creator.

Returns:
If the the site is a group creator.
Throws:
DatabaseException

setLegacy

public void setLegacy(boolean legacy)
               throws DatabaseException
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 true, specify the site in a legacy group.
Throws:
DatabaseException

getLegacy

public boolean getLegacy()
                  throws DatabaseException
Return if the site is in a legacy group.

Returns:
If the site is in a legacy group.
Throws:
DatabaseException

setLocalSite

public void setLocalSite(boolean localSite)
                  throws DatabaseException
Set the site to be the local site.

Parameters:
localSite - If true, it is local site.
Throws:
DatabaseException

getLocalSite

public boolean getLocalSite()
                     throws DatabaseException
Return if the site is the local site.

Returns:
If the site is the local site.
Throws:
DatabaseException

setPeer

public void setPeer(boolean peer)
             throws DatabaseException
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 true, it is peer to loca site.
Throws:
DatabaseException

getPeer

public boolean getPeer()
                throws DatabaseException
Return if the site is peer to local site.

Returns:
If the site is peer to local site.
Throws:
DatabaseException

remove

public void remove()
            throws DatabaseException
Remove the site.

Throws:
DatabaseException

Berkeley DB
version 5.3.21

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