Class AliasedDiscoveryConfig<T extends AliasedDiscoveryConfig<T>>

java.lang.Object
com.hazelcast.config.AliasedDiscoveryConfig<T>
Type Parameters:
T - Subclass that extends AliasedDiscoveryConfig.
All Implemented Interfaces:
DataSerializable, IdentifiedDataSerializable
Direct Known Subclasses:
AwsConfig, AzureConfig, EurekaConfig, GcpConfig, KubernetesConfig

public abstract class AliasedDiscoveryConfig<T extends AliasedDiscoveryConfig<T>> extends Object implements IdentifiedDataSerializable
Configuration for discovery strategy aliases, e.g. <gcp>.
  • Constructor Details

    • AliasedDiscoveryConfig

      protected AliasedDiscoveryConfig(String tag)
    • AliasedDiscoveryConfig

      public AliasedDiscoveryConfig(AliasedDiscoveryConfig aliasedDiscoveryConfig)
    • AliasedDiscoveryConfig

      public AliasedDiscoveryConfig(String tag, boolean enabled, boolean usePublicIp, Map<String,String> properties)
  • Method Details

    • setEnabled

      public T setEnabled(boolean enabled)
      Enables or disables the join mechanism based on the given discovery config.
      Parameters:
      enabled - true if enabled
      Returns:
      the updated discovery config
    • isEnabled

      public boolean isEnabled()
      Checks whether the given join mechanism is enabled.
      Returns:
      true if enabled
    • setProperty

      public T setProperty(String name, String value)
      Sets the property understood by the given SPI Discovery Strategy.

      Note that it interprets and stores as fields the following properties: "enabled", "use-public-ip".

      Parameters:
      name - property name
      value - property value
      Returns:
      the updated discovery config
    • getProperty

      public String getProperty(String name)
      Returns property value by the property name.
      Parameters:
      name - property name
      Returns:
      property value
    • getProperties

      public Map<String,String> getProperties()
      Returns all properties.
      Returns:
      all properties
    • setUsePublicIp

      public T setUsePublicIp(boolean usePublicIp)
      Decides whether the public or private IP should be used to connect to Hazelcast members.
      Parameters:
      usePublicIp - true for public IP, false for private IP
      Returns:
      the updated discovery config
    • isUsePublicIp

      public boolean isUsePublicIp()
      Checks whether the public or private IP should be used to connect to Hazelcast members.
      Returns:
      true for public IP, false for private IP
    • getTag

      public String getTag()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getFactoryId

      public int getFactoryId()
      Description copied from interface: IdentifiedDataSerializable
      Returns DataSerializableFactory factory ID for this class.
      Specified by:
      getFactoryId in interface IdentifiedDataSerializable
      Returns:
      factory ID
    • writeData

      public void writeData(ObjectDataOutput out) throws IOException
      Description copied from interface: DataSerializable
      Writes object fields to output stream
      Specified by:
      writeData in interface DataSerializable
      Parameters:
      out - output
      Throws:
      IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
    • readData

      public void readData(ObjectDataInput in) throws IOException
      Description copied from interface: DataSerializable
      Reads fields from the input stream
      Specified by:
      readData in interface DataSerializable
      Parameters:
      in - input
      Throws:
      IOException - if an I/O error occurs. In particular, an IOException may be thrown if the input stream has been closed.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object