Class MulticastDiscoveryStrategy
java.lang.Object
com.hazelcast.spi.discovery.AbstractDiscoveryStrategy
com.hazelcast.spi.discovery.multicast.MulticastDiscoveryStrategy
- All Implemented Interfaces:
DiscoveryStrategy
public class MulticastDiscoveryStrategy extends AbstractDiscoveryStrategy
The multicast
DiscoveryStrategy
.-
Constructor Summary
Constructors Constructor Description MulticastDiscoveryStrategy(DiscoveryNode discoveryNode, ILogger logger, Map<String,Comparable> properties)
-
Method Summary
Modifier and Type Method Description void
destroy()
Thestop
method is used to stop internal services, sockets or to destroy any kind of internal state.Iterable<DiscoveryNode>
discoverNodes()
Returns a set of all discovered nodes based on the defined properties that were used to create theDiscoveryStrategy
instance.PartitionGroupStrategy
getPartitionGroupStrategy()
Returns a custom implementation of aPartitionGroupStrategy
to override default behavior of zone aware backup strategiesPartitionGroupMetaData
or to provide a specific behavior in case the discovery environment does not provide information about the infrastructure to be used for automatic configuration.void
start()
Thestart
method is used to initialize internal state and perform any kind of startup procedure like multicast socket creation.Methods inherited from class com.hazelcast.spi.discovery.AbstractDiscoveryStrategy
discoverLocalMetadata, getLogger, getOrDefault, getOrDefault, getOrNull, getOrNull, getProperties
-
Constructor Details
-
MulticastDiscoveryStrategy
public MulticastDiscoveryStrategy(DiscoveryNode discoveryNode, ILogger logger, Map<String,Comparable> properties)
-
-
Method Details
-
start
public void start()Description copied from interface:DiscoveryStrategy
Thestart
method is used to initialize internal state and perform any kind of startup procedure like multicast socket creation. The behavior of this method might change based on theDiscoveryNode
instance passed to theDiscoveryStrategyFactory
.- Specified by:
start
in interfaceDiscoveryStrategy
- Overrides:
start
in classAbstractDiscoveryStrategy
-
discoverNodes
Description copied from interface:DiscoveryStrategy
Returns a set of all discovered nodes based on the defined properties that were used to create theDiscoveryStrategy
instance.- Returns:
- a set of all discovered nodes
-
destroy
public void destroy()Description copied from interface:DiscoveryStrategy
Thestop
method is used to stop internal services, sockets or to destroy any kind of internal state.- Specified by:
destroy
in interfaceDiscoveryStrategy
- Overrides:
destroy
in classAbstractDiscoveryStrategy
-
getPartitionGroupStrategy
Description copied from interface:DiscoveryStrategy
Returns a custom implementation of aPartitionGroupStrategy
to override default behavior of zone aware backup strategiesPartitionGroupMetaData
or to provide a specific behavior in case the discovery environment does not provide information about the infrastructure to be used for automatic configuration.- Specified by:
getPartitionGroupStrategy
in interfaceDiscoveryStrategy
- Overrides:
getPartitionGroupStrategy
in classAbstractDiscoveryStrategy
- Returns:
- a custom implementation of a
PartitionGroupStrategy
otherwisenull
in case of the default implementation is to be used
-