final class SingleServerCluster extends BaseCluster
Modifier and Type | Field and Description |
---|---|
private static Logger |
LOGGER |
private ClusterableServer |
server |
Constructor and Description |
---|
SingleServerCluster(ClusterId clusterId,
ClusterSettings settings,
ClusterableServerFactory serverFactory) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes connections to the servers in the cluster.
|
protected void |
connect() |
private ClusterDescription |
getInitialDescription() |
protected ClusterableServer |
getServer(ServerAddress serverAddress)
Return the server at the given address.
|
private void |
publishDescription(ServerDescription serverDescription) |
createServer, fireChangeEvent, getClusterId, getCurrentDescription, getDescription, getServerFactory, getSettings, isClosed, selectServer, selectServerAsync, updateDescription
private static final Logger LOGGER
private final ClusterableServer server
public SingleServerCluster(ClusterId clusterId, ClusterSettings settings, ClusterableServerFactory serverFactory)
protected void connect()
connect
in class BaseCluster
private void publishDescription(ServerDescription serverDescription)
private ClusterDescription getInitialDescription()
protected ClusterableServer getServer(ServerAddress serverAddress)
BaseCluster
getServer
in class BaseCluster
serverAddress
- the addresspublic void close()
Cluster
close
in interface Cluster
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class BaseCluster