Package com.hazelcast.gcp
Class GcpDiscoveryStrategy
java.lang.Object
com.hazelcast.spi.discovery.AbstractDiscoveryStrategy
com.hazelcast.gcp.GcpDiscoveryStrategy
- All Implemented Interfaces:
DiscoveryStrategy
public class GcpDiscoveryStrategy extends AbstractDiscoveryStrategy
GCP implementation of
DiscoveryStrategy
.-
Method Summary
Modifier and Type Method Description Map<String,String>
discoverLocalMetadata()
Returns a map with discovered metadata provided by the runtime environment.Iterable<DiscoveryNode>
discoverNodes()
Returns a set of all discovered nodes based on the defined properties that were used to create theDiscoveryStrategy
instance.Methods inherited from class com.hazelcast.spi.discovery.AbstractDiscoveryStrategy
destroy, getLogger, getOrDefault, getOrDefault, getOrNull, getOrNull, getPartitionGroupStrategy, getProperties, start
-
Method Details
-
discoverLocalMetadata
Description copied from interface:DiscoveryStrategy
Returns a map with discovered metadata provided by the runtime environment. Those information may include, but are not limited, to location information like datacenter, rack, host or additional tags to be used for custom purpose.Information discovered from this method are shaded into the
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 anNullPointerException
inside the cluster system.- Specified by:
discoverLocalMetadata
in interfaceDiscoveryStrategy
- Overrides:
discoverLocalMetadata
in classAbstractDiscoveryStrategy
- Returns:
- a map of discovered metadata as provided by the runtime environment
-
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
-