public class MonitorConfig extends Object implements Cloneable
Monitor
.
The following properties identify the target group.
Modifier and Type | Field and Description |
---|---|
static MonitorConfig |
DEFAULT
An instance created using the default constructor is initialized with
the default settings.
|
Constructor and Description |
---|
MonitorConfig()
An instance created using the default constructor is initialized with
the default settings.
|
Modifier and Type | Method and Description |
---|---|
MonitorConfig |
clone()
Returns a copy of this configuration object.
|
String |
getGroupName()
Gets the name associated with the replication group.
|
String |
getHelperHosts()
Returns the string identifying one or more helper host and port pairs in
this format:
|
Set<InetSocketAddress> |
getHelperSockets() |
String |
getNodeHostname()
Returns the hostname component of the nodeHost property.
|
String |
getNodeHostPort()
Returns the hostname and port associated with this node.
|
String |
getNodeName()
Returns the unique name associated with this monitor.
|
int |
getNodePort()
Returns the port component of the nodeHost property.
|
InetSocketAddress |
getNodeSocketAddress() |
int |
getNumRetries()
Returns the number of times a ping thread attempts to contact a node
before deeming it unreachable.
|
ReplicationNetworkConfig |
getRepNetConfig() |
long |
getRetryInterval()
Returns the number of milliseconds between ping thread retries.
|
int |
getSocketConnectTimeout()
Returns the socketConnection timeout, in milliseconds, used
when the ping thread attempts to establish a connection with a
replication node.
|
MonitorConfig |
setGroupName(String groupName)
Sets the name for the replication group.
|
void |
setGroupNameVoid(String groupName) |
MonitorConfig |
setHelperHosts(String helperHosts)
Identify one or more helpers nodes by their host and port pairs in this
format:
|
void |
setHelperHostsVoid(String helperHosts) |
MonitorConfig |
setNodeHostPort(String hostPort)
Sets the hostname and port associated with this monitor.
|
void |
setNodeHostPortVoid(String hostPort) |
MonitorConfig |
setNodeName(String nodeName)
Sets the name to be associated with this
monitor . |
void |
setNodeNameVoid(String nodeName) |
MonitorConfig |
setNumRetries(int numRetries)
Sets the number of times a ping thread attempts to contact a node
before deeming it unreachable.
|
void |
setNumRetriesVoid(int numRetries) |
MonitorConfig |
setRepNetConfig(ReplicationNetworkConfig netConfig) |
void |
setRepNetConfigVoid(ReplicationNetworkConfig netConfig) |
MonitorConfig |
setRetryInterval(long retryInterval)
Sets the number of milliseconds between ping thread retries.
|
void |
setRetryIntervalVoid(long retryInterval) |
MonitorConfig |
setSocketConnectTimeout(int socketConnectTimeout)
Sets the socketConnection timeout, in milliseconds, used
when the ping thread attempts to establish a connection with a
replication node.
|
void |
setSocketConnectTimeoutVoid(int socketConnectTimeout) |
public static final MonitorConfig DEFAULT
public MonitorConfig()
public MonitorConfig setGroupName(String groupName) throws IllegalArgumentException
groupName
- the alpha numeric string representing the name.IllegalArgumentException
- if the string name is not valid.public void setGroupNameVoid(String groupName) throws IllegalArgumentException
IllegalArgumentException
public String getGroupName()
public MonitorConfig setNodeName(String nodeName) throws IllegalArgumentException
monitor
. It must
be unique within the group. When the monitor
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 monitor.IllegalArgumentException
public void setNodeNameVoid(String nodeName) throws IllegalArgumentException
IllegalArgumentException
public String getNodeName()
public MonitorConfig 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 void setNodeHostPortVoid(String hostPort)
public String getNodeHostPort()
hostname:port
public MonitorConfig setHelperHosts(String helperHosts)
hostname[:port][,hostname[:port]]*
helperHosts
- the string representing the host and port pairs.public void setHelperHostsVoid(String helperHosts)
public String getHelperHosts()
hostname[:port][,hostname[:port]]*
public Set<InetSocketAddress> getHelperSockets()
public String getNodeHostname()
public int getNodePort()
public InetSocketAddress getNodeSocketAddress()
public MonitorConfig setNumRetries(int numRetries)
public void setNumRetriesVoid(int numRetries)
public int getNumRetries()
public MonitorConfig setRetryInterval(long retryInterval)
public void setRetryIntervalVoid(long retryInterval)
public long getRetryInterval()
public MonitorConfig setSocketConnectTimeout(int socketConnectTimeout)
public void setSocketConnectTimeoutVoid(int socketConnectTimeout)
public int getSocketConnectTimeout()
public MonitorConfig clone()
public ReplicationNetworkConfig getRepNetConfig()
public MonitorConfig setRepNetConfig(ReplicationNetworkConfig netConfig)
netConfig
- the new ReplicationNetworkConfig to be associated
with this MonitorConfig. This must not be null.IllegalArgumentException
- if the netConfig is nullpublic void setRepNetConfigVoid(ReplicationNetworkConfig netConfig)
Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.