@InterfaceAudience.Private class ShortCircuitConnectionRegistry extends Object implements ConnectionRegistry
ConnectionRegistry
implementation used at server side, where we could use the
ConnectionRegistryEndpoint
directly, without any rpcs.Modifier and Type | Field and Description |
---|---|
private ConnectionRegistryEndpoint |
endpoint |
Constructor and Description |
---|
ShortCircuitConnectionRegistry(ConnectionRegistryEndpoint endpoint) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this instance and releases any system resources associated with it
|
CompletableFuture<ServerName> |
getActiveMaster()
Get the address of active HMaster.
|
CompletableFuture<String> |
getClusterId()
Should only be called once.
|
String |
getConnectionString()
Return the connection string associated with this registry instance.
|
CompletableFuture<RegionLocations> |
getMetaRegionLocations()
Get the location of meta region(s).
|
private final ConnectionRegistryEndpoint endpoint
public ShortCircuitConnectionRegistry(ConnectionRegistryEndpoint endpoint)
public CompletableFuture<RegionLocations> getMetaRegionLocations()
ConnectionRegistry
getMetaRegionLocations
in interface ConnectionRegistry
public CompletableFuture<String> getClusterId()
ConnectionRegistry
The upper layer should store this value somewhere as it will not be change any more.
getClusterId
in interface ConnectionRegistry
public CompletableFuture<ServerName> getActiveMaster()
ConnectionRegistry
getActiveMaster
in interface ConnectionRegistry
public String getConnectionString()
ConnectionRegistry
getConnectionString
in interface ConnectionRegistry
public void close()
ConnectionRegistry
close
in interface Closeable
close
in interface AutoCloseable
close
in interface ConnectionRegistry
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.