|
Berkeley DB Java Edition version 4.0.103 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.rep.ReplicationMutableConfig
public class ReplicationMutableConfig
Specifies the attributes that may be changed after a ReplicatedEnvironment
has been created. ReplicationMutableConfig
is
a parameter to Environment.setMutableConfig(com.sleepycat.je.EnvironmentMutableConfig)
and is
returned by Environment.getMutableConfig()
.
Field Summary | |
---|---|
static String |
DESIGNATED_PRIMARY
Identifies the Primary node in a two node group. |
static String |
ELECTABLE_GROUP_SIZE_OVERRIDE
An escape mechanism to modify the way in which the number of electable nodes, and consequently the quorum requirements for elections and commit acknowledgments, is calculated. |
Constructor Summary | |
---|---|
ReplicationMutableConfig()
Create a ReplicationMutableConfig initialized with the system default settings. |
Method Summary | |
---|---|
String |
getConfigParam(String paramName)
Return the value for this parameter. |
boolean |
getDesignatedPrimary()
Determines whether this node is the currently designated Primary. |
int |
getElectableGroupSizeOverride()
Returns the value associated with the override. |
ReplicationMutableConfig |
setConfigParam(String paramName,
String value)
Set this configuration parameter with this value. |
ReplicationMutableConfig |
setDesignatedPrimary(boolean isPrimary)
If isPrimary is true, designate this node as a Primary. |
ReplicationMutableConfig |
setElectableGroupSizeOverride(int override)
Sets the size used to determine the number of electable nodes. |
String |
toString()
List the configuration parameters and values that have been set in this configuration object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String DESIGNATED_PRIMARY
Name | Type | Mutable | Default |
"je.rep.designatedPrimary" | Boolean | Yes | False |
public static final String ELECTABLE_GROUP_SIZE_OVERRIDE
When this parameter is set to a non-zero value at a member node, the member will use this value as the electable group size, instead of using the metadata stored in the RepGroup database for its quorum calculations. This parameter's value should be set to the number of nodes known to be available. The default value is zero, which indicates normal operation with the electable group size being calculated from the metadata.
Please keep in mind that this is an escape mechanism, only for use in exceptional circumstances, to be used with care. Since JE HA is no longer maintaining quorum requirements automatically, there is the possibility that the simple majority of unavailable nodes could elect their own Master, which would result in a diverging set of changes to the same environment being made by multiple Masters. It is essential to ensure that the problematic nodes are in fact down before making this temporary configuration change. See the discussion in Appendix: Managing a Failure of the Majority.
Name | Type | Mutable | Default |
"je.rep.electableGroupSizeOverride" | Integer | Yes | 0 |
QuorumPolicy
,
Durability.ReplicaAckPolicy
,
Constant Field ValuesConstructor Detail |
---|
public ReplicationMutableConfig()
Method Detail |
---|
public ReplicationMutableConfig setDesignatedPrimary(boolean isPrimary)
isPrimary
is true, designate this node as a Primary. The
application must ensure that exactly one node is designated to be a
Primary at any given time. Primary node configuration is only a concern
when the group has two nodes, and there cannot be a simple majority. See
the overview on configuring two
node groups
isPrimary
- true if this node is to be made the Primary.
public boolean getDesignatedPrimary()
public int getElectableGroupSizeOverride()
ELECTABLE_GROUP_SIZE_OVERRIDE
public ReplicationMutableConfig setElectableGroupSizeOverride(int override)
override
- the number of electable nodes. A value of zero means
that the number of electable nodes is determined as usual, that is, from
the contents of the group metadata.
ELECTABLE_GROUP_SIZE_OVERRIDE
public ReplicationMutableConfig setConfigParam(String paramName, String value) throws IllegalArgumentException
paramName
- the configuration parameter name, one of the String
constants in this classvalue
- the configuration value.
IllegalArgumentException
- if the paramName or value is invalid.public String getConfigParam(String paramName) throws IllegalArgumentException
paramName
- a valid configuration parameter, one of the String
constants in this class.
IllegalArgumentException
- if the paramName is invalid.public String toString()
toString
in class Object
|
Berkeley DB Java Edition version 4.0.103 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |