public class ArbiterConfig extends ArbiterMutableConfig implements java.lang.Cloneable
Arbiter.Arbiter.Arbiter(ArbiterConfig)| Constructor and Description |
|---|
ArbiterConfig()
Arbiter configuration.
|
ArbiterConfig(java.util.Properties props)
Arbiter configuration.
|
| Modifier and Type | Method and Description |
|---|---|
ArbiterConfig |
clone() |
java.lang.String |
getArbiterHome()
Gets the Arbiter home directory.
|
java.lang.String |
getGroupName()
Gets the name associated with the replication group.
|
int |
getHeartbeatInterval()
Gets the heartbeat interval in milliseconds.
|
java.util.logging.Handler |
getLoggingHandler()
Returns the custom java.util.logging.Handler specified by the
application.
|
java.lang.String |
getNodeHostPort()
Returns the hostname and port associated with this node.
|
java.lang.String |
getNodeName()
Returns the unique name associated with this Arbiter.
|
long |
getUnknownStateTimeout(java.util.concurrent.TimeUnit unit)
Returns the Unknown state timeout.
|
void |
setArbiterHome(java.lang.String arbiterHome)
Sets the Arbiter Home directory
|
ArbiterConfig |
setConfigParam(java.lang.String paramName,
java.lang.String value)
Documentation inherited from ArbiterMutableConfig.setConfigParam.
|
ArbiterConfig |
setGroupName(java.lang.String groupName)
Sets the name for the replication group.
|
ArbiterConfig |
setHeartbeatInterval(int millis)
Sets the heartbeat interval.
|
ArbiterConfig |
setLoggingHandler(java.util.logging.Handler handler) |
ArbiterConfig |
setNodeHostPort(java.lang.String hostPort)
Sets the hostname and port associated with this arbiter.
|
ArbiterConfig |
setNodeName(java.lang.String nodeName)
Sets the name to be associated with this
Arbiter. |
ArbiterConfig |
setUnknownStateTimeout(long timeout,
java.util.concurrent.TimeUnit unit)
Time to wait for the discovery of the Master during the instantiation
of the Arbiter.
|
java.lang.String |
toString()
Display configuration values.
|
copy, getConsoleLoggingLevel, getFileLoggingLevel, getHelperHosts, getProps, setConsoleLoggingLevel, setFileLoggingLevel, setHelperHostspublic ArbiterConfig()
public ArbiterConfig(java.util.Properties props)
props - to initialize configuration object.public java.lang.String getArbiterHome()
public void setArbiterHome(java.lang.String arbiterHome)
arbiterHome - Path of the Arbiter home directory.public ArbiterConfig setNodeName(java.lang.String nodeName) throws java.lang.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.java.lang.IllegalArgumentExceptionpublic java.lang.String getNodeName()
public ArbiterConfig setGroupName(java.lang.String groupName) throws java.lang.IllegalArgumentException
groupName - the alpha numeric string representing the name.java.lang.IllegalArgumentException - if the string name is not valid.public java.lang.String getGroupName()
public ArbiterConfig setNodeHostPort(java.lang.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 java.lang.String getNodeHostPort()
hostname:port
public ArbiterConfig setUnknownStateTimeout(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.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.java.lang.IllegalArgumentException - If the value of timeout is negativepublic long getUnknownStateTimeout(java.util.concurrent.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 setConfigParam(java.lang.String paramName, java.lang.String value) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic ArbiterConfig clone()
clone in class ArbiterMutableConfigpublic ArbiterConfig setLoggingHandler(java.util.logging.Handler handler)
public java.util.logging.Handler getLoggingHandler()
public java.lang.String toString()
toString in class ArbiterMutableConfigCopyright (c) 2002, 2017 Oracle and/or its affiliates. All rights reserved.