public interface DiscoveryService
DefaultDiscoveryService
implementation is used. A DiscoveryService somehow finds available
DiscoveryStrategy
s inside the classpath and manages their activation
or deactivation status.
This interface is used by system integrators, integrating Hazelcast into their own
frameworks or environments, are free to extend or exchange the default implementation
based on their needs and requirements.
Only enabled providers are expected to discover nodes but, depending on the
DiscoveryService implementation, multiple DiscoveryStrategy
s
might be enabled at the same time (e.g. TCP-IP Joiner with well known addresses
and Cloud discovery).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. |
void |
start()
The start method is called on system startup to implement simple
lifecycle management.
|
void start()
DiscoveryStrategy.start()
on all discovered and start up strategies.Iterable<DiscoveryNode> discoverNodes()
NodeFilter
is setup, set of
discovered nodes to connect to.void destroy()
DiscoveryStrategy.destroy()
on all discovered and destroy strategies
before the service itself will be destroyed.Map<String,Object> discoverLocalMetadata()
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.Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.