public class CloudSeedNodeProvider extends Object implements io.hekate.cluster.seed.SeedNodeProvider, io.hekate.core.report.ConfigReportSupport
SeedNodeProvider interface.
This provider uses ComputeService to get meta-information about all instances that are running in the cloud. Addresses of those
instances will be used as seed nodes for ClusterService cluster.
Important: all Hekate cluster nodes must be configured to run on the same port.
Filtering of seed node instances can be done by specifying different configuration options in CloudSeedNodeProviderConfig.
For example:
filter by regions - to scan instances only within a limited set of cloud regions
filter by zones - to scan instances only within a limited set of availability zones
filter by tags - to scan only those instances that have the specified set of tags
Please see the documentation of CloudSeedNodeProviderConfig class for more details about the available configuration options.
ClusterServiceFactory.setSeedNodeProvider(SeedNodeProvider),
SeedNodeProvider| Constructor and Description |
|---|
CloudSeedNodeProvider(CloudSeedNodeProviderConfig cfg)
Constructs new instance.
|
| Modifier and Type | Method and Description |
|---|---|
long |
cleanupInterval() |
String |
endpoint()
Cloud endpoint.
|
List<InetSocketAddress> |
findSeedNodes(String namespace) |
Properties |
properties()
Cloud provider properties.
|
String |
provider()
Cloud provider.
|
void |
registerRemote(String namespace,
InetSocketAddress node) |
void |
report(io.hekate.core.report.ConfigReporter report) |
void |
startDiscovery(String namespace,
InetSocketAddress node) |
void |
stopDiscovery(String namespace,
InetSocketAddress node) |
void |
suspendDiscovery() |
String |
toString() |
void |
unregisterRemote(String namespace,
InetSocketAddress node) |
public CloudSeedNodeProvider(CloudSeedNodeProviderConfig cfg)
cfg - Configuration.public void report(io.hekate.core.report.ConfigReporter report)
report in interface io.hekate.core.report.ConfigReportSupportpublic String provider()
CloudSeedNodeProviderConfig.setProvider(String)public String endpoint()
CloudSeedNodeProviderConfig.setEndpoint(String)public Properties properties()
CloudSeedNodeProviderConfig.setProperties(Properties)public void startDiscovery(String namespace, InetSocketAddress node) throws io.hekate.core.HekateException
startDiscovery in interface io.hekate.cluster.seed.SeedNodeProviderio.hekate.core.HekateExceptionpublic void stopDiscovery(String namespace, InetSocketAddress node) throws io.hekate.core.HekateException
stopDiscovery in interface io.hekate.cluster.seed.SeedNodeProviderio.hekate.core.HekateExceptionpublic List<InetSocketAddress> findSeedNodes(String namespace) throws io.hekate.core.HekateException
findSeedNodes in interface io.hekate.cluster.seed.SeedNodeProviderio.hekate.core.HekateExceptionpublic void suspendDiscovery()
throws io.hekate.core.HekateException
suspendDiscovery in interface io.hekate.cluster.seed.SeedNodeProviderio.hekate.core.HekateExceptionpublic long cleanupInterval()
cleanupInterval in interface io.hekate.cluster.seed.SeedNodeProviderpublic void registerRemote(String namespace, InetSocketAddress node) throws io.hekate.core.HekateException
registerRemote in interface io.hekate.cluster.seed.SeedNodeProviderio.hekate.core.HekateExceptionpublic void unregisterRemote(String namespace, InetSocketAddress node) throws io.hekate.core.HekateException
unregisterRemote in interface io.hekate.cluster.seed.SeedNodeProviderio.hekate.core.HekateException