|
|||||||||
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. |
protected Properties |
props
|
(package private) boolean |
validateParams
|
Constructor Summary | |
---|---|
ReplicationMutableConfig()
Create a ReplicationMutableConfig initialized with the system default settings. |
|
ReplicationMutableConfig(Properties properties,
boolean validateParams)
Used by ReplicationConfig to support construction from a property file. |
Method Summary | |
---|---|
protected Object |
clone()
|
void |
copyMutablePropsTo(ReplicationMutableConfig toConfig)
|
(package private) void |
fillInEnvironmentGeneratedProps(RepImpl repImpl)
Fills in the properties calculated by the environment to the given config object. |
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. |
int |
getPriority()
|
Properties |
getProps()
|
boolean |
getValidateParams()
|
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. |
(package private) void |
setOverrideValidateParams(boolean validateParams)
For unit testing only |
ReplicationMutableConfig |
setPriority(int priority)
|
String |
toString()
List the configuration parameters and values that have been set in this configuration object. |
(package private) void |
validateProperties(Properties checkProps)
Validate a property bag passed in a construction time. |
Methods inherited from class java.lang.Object |
---|
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 Valuesprotected Properties props
boolean validateParams
Constructor Detail |
---|
public ReplicationMutableConfig()
ReplicationMutableConfig(Properties properties, boolean validateParams) throws IllegalArgumentException
properties
- Hold replication related properties
IllegalArgumentException
Method Detail |
---|
void fillInEnvironmentGeneratedProps(RepImpl repImpl)
public void copyMutablePropsTo(ReplicationMutableConfig toConfig)
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 int getPriority()
public ReplicationMutableConfig setPriority(int priority)
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.void validateProperties(Properties checkProps) throws IllegalArgumentException
IllegalArgumentException
public Properties getProps()
public String toString()
toString
in class Object
void setOverrideValidateParams(boolean validateParams)
public boolean getValidateParams()
protected Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |