public class DefaultDiscoveryService extends Object implements DiscoveryService
Constructor and Description |
---|
DefaultDiscoveryService(DiscoveryServiceSettings settings) |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
The start method is called on system startup to implement simple
lifecycle management.
|
Map<String,Object> |
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. |
Iterable<DiscoveryStrategy> |
getDiscoveryStrategies() |
void |
start()
The start method is called on system startup to implement simple
lifecycle management.
|
public DefaultDiscoveryService(DiscoveryServiceSettings settings)
public void start()
DiscoveryService
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,Object> discoverLocalMetadata()
DiscoveryService
Member
s
attributes. Existing attributes will not be overridden, that way local attribute configuration
overrides provided metadata.
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
DiscoveryStrategy.destroy()
on all discovered and destroy strategies
before the service itself will be destroyed.destroy
in interface DiscoveryService
public Iterable<DiscoveryStrategy> getDiscoveryStrategies()
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.