public class ClusterClient
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static com.fasterxml.jackson.databind.ObjectMapper |
mapper |
| Constructor and Description |
|---|
ClusterClient() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_renewal(java.net.Socket socket) |
void |
connect(java.lang.String clusterAddress)
connects to Cluster's admin port.
|
int |
getAdminPort() |
java.lang.String |
getHost() |
long |
getRenewalPeriod() |
java.lang.String |
getServiceName() |
java.util.List<ClusterService> |
getServices() |
protected void |
renewal()
Renew services.
|
ClusterService |
select() |
protected java.net.Socket |
selectSocket() |
void |
setAdminPort(int adminPort) |
void |
setHost(java.lang.String host) |
void |
setRenewalPeriod(long renewalPeriod) |
void |
setServiceName(java.lang.String serviceName) |
void |
setServices(java.util.List<ClusterService> services) |
void |
start()
Starts the renewal thread.
|
void |
stop()
Stops the renewal thread.
|
public long getRenewalPeriod()
public void setRenewalPeriod(long renewalPeriod)
public java.util.List<ClusterService> getServices()
public void setServices(java.util.List<ClusterService> services)
public java.lang.String getHost()
public void setHost(java.lang.String host)
public int getAdminPort()
public void setAdminPort(int adminPort)
public java.lang.String getServiceName()
public void setServiceName(java.lang.String serviceName)
public void connect(java.lang.String clusterAddress)
clusterAddress - addresspublic ClusterService select()
public void stop()
public void start()
protected void renewal()
throws java.io.IOException
java.io.IOExceptionprotected void _renewal(java.net.Socket socket)
throws java.io.IOException
java.io.IOExceptionprotected java.net.Socket selectSocket()
throws java.io.IOException
java.io.IOException