Class MulticastDiscoveryStrategy
java.lang.Object
com.hazelcast.spi.discovery.AbstractDiscoveryStrategy
com.hazelcast.spi.discovery.multicast.MulticastDiscoveryStrategy
- All Implemented Interfaces:
DiscoveryStrategy
The multicast
DiscoveryStrategy
.-
Constructor Summary
ConstructorDescriptionMulticastDiscoveryStrategy
(DiscoveryNode discoveryNode, ILogger logger, Map<String, Comparable> properties) -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Thestop
method is used to stop internal services, sockets or to destroy any kind of internal state.Returns a set of all discovered nodes based on the defined properties that were used to create theDiscoveryStrategy
instance.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, getPartitionGroupStrategy, getProperties
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.hazelcast.spi.discovery.DiscoveryStrategy
getUnhealthyEndpoints, markEndpointAsUnhealthy
-
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
- 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
-