com.hazelcast.config

## Class CountDownLatchConfig

- java.lang.Object
- - com.hazelcast.config.CountDownLatchConfig

- All Implemented Interfaces:
    DataSerializable, IdentifiedDataSerializable, com.hazelcast.nio.serialization.impl.Versioned

      public class CountDownLatchConfig
      extends Object
      implements IdentifiedDataSerializable, com.hazelcast.nio.serialization.impl.Versioned

  Contains the configuration for an `ICountDownLatch`.
  Since:
    3.10

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CountDownLatchConfig()` Creates a default configured `CountDownLatchConfig`.
    `CountDownLatchConfig(CountDownLatchConfig config)` Creates a CountDownLatchConfig by cloning another one.
    `CountDownLatchConfig(String name)` Creates a default configured `CountDownLatchConfig` setting its name to the given name.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `CountDownLatchConfig` | `getAsReadOnly()` Deprecated. this method will be removed in 4.0; it is meant for internal usage only
    `int` | `getFactoryId()` Returns DataSerializableFactory factory ID for this class.
    `int` | `getId()` Returns type identifier for this class.
    `String` | `getName()` Gets the name of the CountDownLatch.
    `String` | `getQuorumName()`
    `int` | `hashCode()`
    `void` | `readData(ObjectDataInput in)` Reads fields from the input stream
    `CountDownLatchConfig` | `setName(String name)` Sets the name of the CountDownLatch.
    `CountDownLatchConfig` | `setQuorumName(String quorumName)`
    `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

    - #### CountDownLatchConfig

          public CountDownLatchConfig()

      Creates a default configured `CountDownLatchConfig`.

    - #### CountDownLatchConfig

          public CountDownLatchConfig(String name)

      Creates a default configured `CountDownLatchConfig` setting its name to the given name.
      Parameters:
        `name` - name to set

    - #### CountDownLatchConfig

          public CountDownLatchConfig(CountDownLatchConfig config)

      Creates a CountDownLatchConfig by cloning another one.
      Parameters:
        `config` - the CountDownLatchConfig to copy
      Throws:
        `IllegalArgumentException` - if config is `null`

  - ### Method Detail

    - #### getAsReadOnly

          public CountDownLatchConfig getAsReadOnly()

      Deprecated. this method will be removed in 4.0; it is meant for internal usage only
      Gets immutable version of this configuration.
      Returns:
        immutable version of this configuration

    - #### getName

          public String getName()

      Gets the name of the CountDownLatch. If no name has been configured, `null` is returned.
      Returns:
        the name of the CountDownLatch

    - #### setName

          public CountDownLatchConfig setName(String name)

      Sets the name of the CountDownLatch.
      Parameters:
        `name` - the name of the CountDownLatch
      Returns:
        the updated CountDownLatchConfig
      Throws:
        `IllegalArgumentException` - if name is `null` or empty

    - #### getQuorumName

          public String getQuorumName()

    - #### setQuorumName

          public CountDownLatchConfig setQuorumName(String quorumName)

    - #### 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

    - #### getId

          public int getId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns type identifier for this class. It should be unique per DataSerializableFactory.
      Specified by:
        `getId` in interface `IdentifiedDataSerializable`
      Returns:
        type 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 final boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public final int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2018. All rights reserved.