public class ArbiterConfig extends ArbiterMutableConfig implements Cloneable
Arbiter.Arbiter.Arbiter(ArbiterConfig)| Constructor and Description |
|---|
ArbiterConfig()
Arbiter configuration.
|
ArbiterConfig(Properties props)
Arbiter configuration.
|
| Modifier and Type | Method and Description |
|---|---|
ArbiterConfig |
clone() |
String |
getArbiterHome()
Gets the Arbiter home directory.
|
long |
getChannelTimeout(TimeUnit unit) |
boolean |
getEnableGroupAcks() |
long |
getFeederTimeout(TimeUnit unit) |
String |
getGroupName()
Gets the name associated with the replication group.
|
int |
getHeartbeatInterval()
Gets the heartbeat interval in milliseconds.
|
Handler |
getLoggingHandler()
Returns the custom java.util.logging.Handler specified by the
application.
|
int |
getMessageQueueSize() |
String |
getNodeHostPort()
Returns the hostname and port associated with this node.
|
String |
getNodeName()
Returns the unique name associated with this Arbiter.
|
long |
getPreHeartbeatTimeout(TimeUnit unit) |
int |
getReceiveBufferSize() |
ReplicationNetworkConfig |
getRepNetConfig() |
long |
getStreamOpenTimeout(TimeUnit unit) |
long |
getUnknownStateTimeout(TimeUnit unit)
Returns the Unknown state timeout.
|
void |
setArbiterHome(String arbiterHome)
Sets the Arbiter Home directory
|
ArbiterConfig |
setChannelTimeout(long timeout,
TimeUnit unit) |
ArbiterConfig |
setConfigParam(String paramName,
String value)
Documentation inherited from ArbiterMutableConfig.setConfigParam.
|
ArbiterConfig |
setEnableGroupAcks(boolean val) |
ArbiterConfig |
setFeederTimeout(long timeout,
TimeUnit unit) |
ArbiterConfig |
setGroupName(String groupName)
Sets the name for the replication group.
|
ArbiterConfig |
setHeartbeatInterval(int millis)
Sets the heartbeat interval.
|
ArbiterConfig |
setLoggingHandler(Handler handler) |
ArbiterConfig |
setMessageQueueSize(int val) |
ArbiterConfig |
setNodeHostPort(String hostPort)
Sets the hostname and port associated with this arbiter.
|
ArbiterConfig |
setNodeName(String nodeName)
Sets the name to be associated with this
Arbiter. |
ArbiterConfig |
setPreHeartbeatTimeout(long timeout,
TimeUnit unit) |
ArbiterConfig |
setReceiveBufferSize(int val) |
ArbiterConfig |
setRepNetConfig(ReplicationNetworkConfig netConfig) |
void |
setRepNetConfigVoid(ReplicationNetworkConfig netConfig) |
ArbiterConfig |
setStreamOpenTimeout(long timeout,
TimeUnit unit) |
ArbiterConfig |
setUnknownStateTimeout(long timeout,
TimeUnit unit)
Time to wait for the discovery of the Master during the instantiation
of the Arbiter.
|
String |
toString()
Display configuration values.
|
copy, getConfigParam, getConsoleLoggingLevel, getFileLoggingLevel, getHelperHosts, getProps, isConfigParamSet, setConsoleLoggingLevel, setFileLoggingLevel, setHelperHostspublic ArbiterConfig()
public ArbiterConfig(Properties props)
props - to initialize configuration object.public String getArbiterHome()
public void setArbiterHome(String arbiterHome)
arbiterHome - Path of the Arbiter home directory.public ArbiterConfig setNodeName(String nodeName) throws IllegalArgumentException
Arbiter. It must
be unique within the group. When the Arbiter is
instantiated and joins the replication group, a check is done to ensure
that the name is unique, and a
RestartRequiredException is thrown if it is
not.nodeName - the name of this arbiter.IllegalArgumentExceptionpublic String getNodeName()
public ArbiterConfig setGroupName(String groupName) throws IllegalArgumentException
groupName - the alpha numeric string representing the name.IllegalArgumentException - if the string name is not valid.public String getGroupName()
public ArbiterConfig setNodeHostPort(String hostPort)
hostname[:port]The port must be outside the range of "Well Known Ports" (zero through 1023).
hostPort - the string containing the hostname and port as above.public String getNodeHostPort()
hostname:port
public ArbiterConfig setUnknownStateTimeout(long timeout, TimeUnit unit) throws IllegalArgumentException
timeout - The unknown state timeout. A value of 0 turns off
Unknown state timeouts. The creation of the Arbiter will wait until
a Master is found.unit - the TimeUnit of the timeout value. May be null only
if timeout is zero.IllegalArgumentException - If the value of timeout is negativepublic long getUnknownStateTimeout(TimeUnit unit)
A value of 0 means Unknown state timeouts are not configured.
unit - the TimeUnit of the returned value. May not be null.public ArbiterConfig setHeartbeatInterval(int millis)
millis - Interval in milliseconds.public int getHeartbeatInterval()
public ArbiterConfig setMessageQueueSize(int val)
val - size of the queuepublic ArbiterConfig setEnableGroupAcks(boolean val)
val - Boolean value.public boolean getEnableGroupAcks()
public int getMessageQueueSize()
public ArbiterConfig setChannelTimeout(long timeout, TimeUnit unit) throws IllegalArgumentException
timeout - Timeout valueunit - time unitIllegalArgumentExceptionpublic long getChannelTimeout(TimeUnit unit)
unit - TimeUnitpublic ArbiterConfig setPreHeartbeatTimeout(long timeout, TimeUnit unit) throws IllegalArgumentException
timeout - Maximum time to wait.unit - TimeUnitIllegalArgumentExceptionpublic long getPreHeartbeatTimeout(TimeUnit unit)
unit - TimeUnitpublic ArbiterConfig setFeederTimeout(long timeout, TimeUnit unit) throws IllegalArgumentException
timeout - Timeout valueunit - time unitIllegalArgumentExceptionpublic long getFeederTimeout(TimeUnit unit)
unit - TimeUnitpublic ArbiterConfig setReceiveBufferSize(int val)
val - size of the bufferpublic int getReceiveBufferSize()
public ArbiterConfig setStreamOpenTimeout(long timeout, TimeUnit unit) throws IllegalArgumentException
timeout - maximum time to waitunit - TimeUnitIllegalArgumentExceptionpublic long getStreamOpenTimeout(TimeUnit unit)
unit - TimeUnitpublic ReplicationNetworkConfig getRepNetConfig()
public ArbiterConfig setRepNetConfig(ReplicationNetworkConfig netConfig)
netConfig - the new ReplicationNetworkConfig to be associated
with this MonitorConfig. This must not be null.IllegalArgumentException - if the netConfig is nullpublic ArbiterConfig setConfigParam(String paramName, String value) throws IllegalArgumentException
setConfigParam in class ArbiterMutableConfigparamName - the configuration parameter name, one of the String
constants in this classvalue - The configuration valueIllegalArgumentException - if the paramName or value is invalid.public void setRepNetConfigVoid(ReplicationNetworkConfig netConfig)
public ArbiterConfig clone()
clone in class ArbiterMutableConfigpublic ArbiterConfig setLoggingHandler(Handler handler)
public Handler getLoggingHandler()
public String toString()
toString in class ArbiterMutableConfigCopyright © 2024. All rights reserved.