public class PredefinedDiscoveryService extends Object implements DiscoveryService
| Constructor and Description |
|---|
PredefinedDiscoveryService(DiscoveryStrategy strategy) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
The
start method is called on system startup to implement simple
lifecycle management. |
Map<String,String> |
discoverLocalMetadata()
Returns a map with discovered metadata provided by the runtime environment.
|
Iterable<DiscoveryNode> |
discoverNodes()
Returns a discovered and filtered, if a
NodeFilter is setup, set of
discovered nodes to connect to. |
void |
start()
The
start method is called on system startup to implement simple
lifecycle management. |
public PredefinedDiscoveryService(DiscoveryStrategy strategy)
public void start()
DiscoveryServicestart method is called on system startup to implement simple
lifecycle management. This method is expected to call
DiscoveryStrategy.start() on all discovered and start up strategies.start in interface DiscoveryServicepublic Iterable<DiscoveryNode> discoverNodes()
DiscoveryServiceNodeFilter is setup, set of
discovered nodes to connect to.discoverNodes in interface DiscoveryServicepublic Map<String,String> discoverLocalMetadata()
DiscoveryService
Information discovered from this method are copied into the Members
attributes. Existing attributes will be overridden.
The default implementation provides an empty map with no further metadata configured. Returning
null is not permitted and will most probably result in an NullPointerException
inside the cluster system.
discoverLocalMetadata in interface DiscoveryServicepublic void destroy()
DiscoveryServicestart method is called on system startup to implement simple
lifecycle management. This method is expected to call
DiscoveryStrategy.destroy() on all discovered and destroy strategies
before the service itself will be destroyed.destroy in interface DiscoveryServiceCopyright © 2019 Hazelcast, Inc.. All rights reserved.