Class GcpDiscoveryStrategy

All Implemented Interfaces:

public class GcpDiscoveryStrategy
extends AbstractDiscoveryStrategy
GCP implementation of DiscoveryStrategy.
  • Method Details

    • discoverLocalMetadata

      public Map<String,​String> 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 Members 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.

      Specified by:
      discoverLocalMetadata in interface DiscoveryStrategy
      discoverLocalMetadata in class AbstractDiscoveryStrategy
      a map of discovered metadata as provided by the runtime environment
    • discoverNodes

      public Iterable<DiscoveryNode> discoverNodes()
      Description copied from interface: DiscoveryStrategy
      Returns a set of all discovered nodes based on the defined properties that were used to create the DiscoveryStrategy instance.
      a set of all discovered nodes