Class AliasedDiscoveryConfig<T extends AliasedDiscoveryConfig<T>>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int getFactoryId()
      Returns DataSerializableFactory factory ID for this class.
      java.util.Map<java.lang.String,​java.lang.String> getProperties()
      Returns all properties.
      java.lang.String getProperty​(java.lang.String name)
      Returns property value by the property name.
      java.lang.String getTag()  
      int hashCode()  
      boolean isEnabled()
      Checks whether the given join mechanism is enabled.
      boolean isUsePublicIp()
      Checks whether the public or private IP should be used to connect to Hazelcast members.
      void readData​(ObjectDataInput in)
      Reads fields from the input stream
      T setEnabled​(boolean enabled)
      Enables or disables the join mechanism based on the given discovery config.
      T setProperty​(java.lang.String name, java.lang.String value)
      Sets the property understood by the given SPI Discovery Strategy.
      T setUsePublicIp​(boolean usePublicIp)
      Decides whether the public or private IP should be used to connect to Hazelcast members.
      java.lang.String toString()  
      void writeData​(ObjectDataOutput out)
      Writes object fields to output stream
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AliasedDiscoveryConfig

        protected AliasedDiscoveryConfig​(java.lang.String tag)
      • AliasedDiscoveryConfig

        public AliasedDiscoveryConfig​(java.lang.String tag,
                                      boolean enabled,
                                      boolean usePublicIp,
                                      java.util.Map<java.lang.String,​java.lang.String> properties)
    • Method Detail

      • 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​(java.lang.String name,
                             java.lang.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 java.lang.String getProperty​(java.lang.String name)
        Returns property value by the property name.
        Parameters:
        name - property name
        Returns:
        property value
      • getProperties

        public java.util.Map<java.lang.String,​java.lang.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 java.lang.String getTag()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • writeData

        public void writeData​(ObjectDataOutput out)
                       throws java.io.IOException
        Description copied from interface: DataSerializable
        Writes object fields to output stream
        Specified by:
        writeData in interface DataSerializable
        Parameters:
        out - output
        Throws:
        java.io.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 java.io.IOException
        Description copied from interface: DataSerializable
        Reads fields from the input stream
        Specified by:
        readData in interface DataSerializable
        Parameters:
        in - input
        Throws:
        java.io.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​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object