Package com.sleepycat.db
Class ReplicationManagerSite
java.lang.Object
com.sleepycat.db.ReplicationManagerSite
A ReplicationManagerSite handle is used to manage a site in a replication group.
ReplicationManagerSite handles are opened using the
Environment.getReplicationManagerSite method.-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the site.Get the address of the site.booleanReturn if the site is a helper for the local site.Get the address and configuration of the site.intgetEid()Get the environment id of the site.booleanReturn if the site is a group creator.booleanReturn if the site is in a legacy group.booleanReturn if the site is the local site.booleangetPeer()Return if the site is peer to local site.voidremove()Remove the site.voidsetBootstrapHelper(boolean helper) Set the site to be a helper site.voidsetGroupCreator(boolean groupCreator) Set the site to be a group creator.voidsetLegacy(boolean legacy) Specify the site in a legacy group.voidsetLocalSite(boolean localSite) Set the site to be the local site.voidsetPeer(boolean peer) Set the site to be peer to local site.
-
Method Details
-
close
Close the site.- Throws:
DatabaseException
-
getAddress
Get the address of the site.- Returns:
- the address of the site.
- Throws:
DatabaseException
-
getConfig
Get the address and configuration of the site.- Returns:
- the configuration of the site.
- Throws:
DatabaseException
-
getEid
Get the environment id of the site.- Returns:
- the environment id of the site.
- Throws:
DatabaseException
-
setBootstrapHelper
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
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
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
Return if the site is a group creator.- Returns:
- If the the site is a group creator.
- Throws:
DatabaseException
-
setLegacy
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
Return if the site is in a legacy group.- Returns:
- If the site is in a legacy group.
- Throws:
DatabaseException
-
setLocalSite
Set the site to be the local site.- Parameters:
localSite- If true, it is local site.- Throws:
DatabaseException
-
getLocalSite
Return if the site is the local site.- Returns:
- If the site is the local site.
- Throws:
DatabaseException
-
setPeer
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
Return if the site is peer to local site.- Returns:
- If the site is peer to local site.
- Throws:
DatabaseException
-
remove
Remove the site.- Throws:
DatabaseException
-