Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 4.0.103
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sleepycat.je.rep
Class ReplicationMutableConfig

    java.lang.Object
      com.sleepycat.je.rep.ReplicationMutableConfig

All Implemented Interfaces:
  Cloneable

Direct Known Subclasses:
  ReplicationConfig

    public class ReplicationMutableConfig

extends Object
implements Cloneable

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

### DESIGNATED_PRIMARY

    public static final String DESIGNATED_PRIMARY

  Identifies the Primary node in a two node group. See the discussion of issues when configuring two node groups

  Name | Type | Mutable | Default
  "je.rep.designatedPrimary" | Boolean | Yes | False

  See Also:
    Constant Field Values

### ELECTABLE_GROUP_SIZE_OVERRIDE

    public static final 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. The override is accomplished by specifying the quorum size via this mutable configuration parameter.

  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

  See Also:
    `QuorumPolicy`, `Durability.ReplicaAckPolicy`, Constant Field Values

Constructor Detail

### ReplicationMutableConfig

    public ReplicationMutableConfig()

  Create a ReplicationMutableConfig initialized with the system default settings. Parameter defaults are documented with the string constants in this class.

Method Detail

### setDesignatedPrimary

    public ReplicationMutableConfig setDesignatedPrimary(boolean isPrimary)

  If `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

  Parameters:
    `isPrimary` - true if this node is to be made the Primary.
  Returns:
    this;

### getDesignatedPrimary

    public boolean getDesignatedPrimary()

  Determines whether this node is the currently designated Primary. See the overview on issues around two node groups

  Returns:
    true if this node is a Primary, false otherwise.

### getElectableGroupSizeOverride

    public int getElectableGroupSizeOverride()

  Returns the value associated with the override. A value of zero means that the number of electable nodes is determined as usual, that is, from the contents of the group metadata.

  Returns:
    the number of electable nodes as specified by the override
  See Also:
    `ELECTABLE_GROUP_SIZE_OVERRIDE`

### setElectableGroupSizeOverride

    public ReplicationMutableConfig setElectableGroupSizeOverride(int override)

  Sets the size used to determine the number of electable nodes.

  Parameters:
    `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.
  Returns:
    this
  See Also:
    `ELECTABLE_GROUP_SIZE_OVERRIDE`

### setConfigParam

    public ReplicationMutableConfig setConfigParam(String paramName,
                                                   String value)
                                            throws IllegalArgumentException

  Set this configuration parameter with this value. Values are validated before setting the parameter.

  Parameters:
    `paramName` - the configuration parameter name, one of the String constants in this class
    `value` - the configuration value.
  Returns:
    this;
  Throws:
    `IllegalArgumentException` - if the paramName or value is invalid.

### getConfigParam

    public String getConfigParam(String paramName)
                          throws IllegalArgumentException

  Return the value for this parameter.

  Parameters:
    `paramName` - a valid configuration parameter, one of the String constants in this class.
  Returns:
    the configuration value.
  Throws:
    `IllegalArgumentException` - if the paramName is invalid.

### toString

    public String toString()

  List the configuration parameters and values that have been set in this configuration object.

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 4.0.103
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2004-2010 Oracle. All rights reserved.