com.hazelcast.spi.properties

## Class HazelcastProperty

- java.lang.Object
- - com.hazelcast.spi.properties.HazelcastProperty

-     public final class HazelcastProperty
      extends Object

  Interface for Hazelcast Member and Client properties.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `HazelcastProperty(String name)`
    `` | `HazelcastProperty(String name, boolean defaultValue)`
    `` | `HazelcastProperty(String name, Byte defaultValue)`
    `` | `HazelcastProperty(String name, HazelcastProperty groupProperty)`
    `` | `HazelcastProperty(String name, Integer defaultValue)`
    `` | `HazelcastProperty(String name, Integer defaultValue, TimeUnit timeUnit)`
    `` | `HazelcastProperty(String name, Long defaultValue, TimeUnit timeUnit)`
    `` | `HazelcastProperty(String name, String defaultValue)`
    `protected` | `HazelcastProperty(String name, String defaultValue, TimeUnit timeUnit)`
    `` | `HazelcastProperty(String name, String defaultValue, TimeUnit timeUnit, HazelcastProperty parent)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getDefaultValue()` Returns the default value of the property.
    `String` | `getDeprecatedName()`
    `String` | `getName()` Returns the property name.
    `HazelcastProperty` | `getParent()` Returns the parent `GroupProperty` of the property.
    `String` | `getSystemProperty()` Gets the system property value of the property.
    `TimeUnit` | `getTimeUnit()` Returns the `TimeUnit` of the property.
    `HazelcastProperty` | `setDeprecatedName(String deprecatedName)` Sets the deprecated name of ths property.
    `void` | `setSystemProperty(String value)` Sets the system property value of the property.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### HazelcastProperty

          public HazelcastProperty(String name)

    - #### HazelcastProperty

          public HazelcastProperty(String name,
                                   boolean defaultValue)

    - #### HazelcastProperty

          public HazelcastProperty(String name,
                                   Integer defaultValue)

    - #### HazelcastProperty

          public HazelcastProperty(String name,
                                   Byte defaultValue)

    - #### HazelcastProperty

          public HazelcastProperty(String name,
                                   Integer defaultValue,
                                   TimeUnit timeUnit)

    - #### HazelcastProperty

          public HazelcastProperty(String name,
                                   Long defaultValue,
                                   TimeUnit timeUnit)

    - #### HazelcastProperty

          public HazelcastProperty(String name,
                                   HazelcastProperty groupProperty)

    - #### HazelcastProperty

          public HazelcastProperty(String name,
                                   String defaultValue)

    - #### HazelcastProperty

          protected HazelcastProperty(String name,
                                      String defaultValue,
                                      TimeUnit timeUnit)

    - #### HazelcastProperty

          public HazelcastProperty(String name,
                                   String defaultValue,
                                   TimeUnit timeUnit,
                                   HazelcastProperty parent)

  - ### Method Detail

    - #### setDeprecatedName

          public HazelcastProperty setDeprecatedName(String deprecatedName)

      Sets the deprecated name of ths property. Useful if compatibility needs to be provided on property names. This method is thread-safe, but is expected to be called immediately after the HazelcastProperty is constructed. `HazelcastProperty property = new HazelcastProperty("newname").setDeprecatedName("oldname");`
      Parameters:
        `deprecatedName` - the deprecated name of the property
      Returns:
        the updated `HazelcastProperty`
      Throws:
        `IllegalArgumentException` - if the deprecatedName is null or an empty string.

    - #### getDeprecatedName

          public String getDeprecatedName()

    - #### getName

          public String getName()

      Returns the property name.
      Returns:
        the property name

    - #### getDefaultValue

          public String getDefaultValue()

      Returns the default value of the property.
      Returns:
        the default value or `null` if none is defined

    - #### getTimeUnit

          public TimeUnit getTimeUnit()

      Returns the `TimeUnit` of the property.
      Returns:
        the `TimeUnit`
      Throws:
        `IllegalArgumentException` - if no `TimeUnit` is defined

    - #### getParent

          public HazelcastProperty getParent()

      Returns the parent `GroupProperty` of the property.
      Returns:
        the parent `GroupProperty` or `null` if none is defined

    - #### setSystemProperty

          public void setSystemProperty(String value)

      Sets the system property value of the property.
      Parameters:
        `value` - the value to set

    - #### getSystemProperty

          public String getSystemProperty()

      Gets the system property value of the property.
      Returns:
        the value of the property

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2019. All rights reserved.