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()
DiscoveryService
start
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 DiscoveryService
public Iterable<DiscoveryNode> discoverNodes()
DiscoveryService
NodeFilter
is setup, set of
discovered nodes to connect to.discoverNodes
in interface DiscoveryService
public Map<String,String> discoverLocalMetadata()
DiscoveryService
Information discovered from this method are copied into the Member
s
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 DiscoveryService
public void destroy()
DiscoveryService
start
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 DiscoveryService
Copyright © 2019 Hazelcast, Inc.. All rights reserved.