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, updateDescriptionprivate static final Logger LOGGER
private final ClusterableServer server
public SingleServerCluster(ClusterId clusterId, ClusterSettings settings, ClusterableServerFactory serverFactory)
protected void connect()
connect in class BaseClusterprivate void publishDescription(ServerDescription serverDescription)
private ClusterDescription getInitialDescription()
protected ClusterableServer getServer(ServerAddress serverAddress)
BaseClustergetServer in class BaseClusterserverAddress - the addresspublic void close()
Clusterclose in interface Clusterclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class BaseCluster