com.hazelcast.config

## Class LockConfig

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

- All Implemented Interfaces:
    NamedConfig, DataSerializable, IdentifiedDataSerializable

      public class LockConfig
      extends Object
      implements IdentifiedDataSerializable, NamedConfig

  Contains the configuration for the `ILock`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LockConfig()`
    `LockConfig(LockConfig config)` Clones a `LockConfig`
    `LockConfig(String name)` Creates a `LockConfig` with the provided name.
    `LockConfig(String name, LockConfig config)` Creates a new `LockConfig` by cloning an existing config and overriding the name.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `LockConfig` | `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()` Returns the name of the lock.
    `String` | `getQuorumName()` Returns the quorum name for lock operations.
    `int` | `hashCode()`
    `void` | `readData(ObjectDataInput in)` Reads fields from the input stream
    `LockConfig` | `setName(String name)` Sets the name of the lock.
    `LockConfig` | `setQuorumName(String quorumName)` Sets the quorum name for lock operations.
    `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

    - #### LockConfig

          public LockConfig()

    - #### LockConfig

          public LockConfig(String name)

      Creates a `LockConfig` with the provided name.
      Parameters:
        `name` - the name
      Throws:
        `NullPointerException` - if name is `null`

    - #### LockConfig

          public LockConfig(LockConfig config)

      Clones a `LockConfig`
      Parameters:
        `config` - the lock config to clone
      Throws:
        `NullPointerException` - if config is `null`

    - #### LockConfig

          public LockConfig(String name,
                            LockConfig config)

      Creates a new `LockConfig` by cloning an existing config and overriding the name.
      Parameters:
        `name` - the new name
        `config` - the config
      Throws:
        `NullPointerException` - if name or config is `null`

  - ### Method Detail

    - #### setName

          public LockConfig setName(String name)

      Sets the name of the lock.
      Specified by:
        `setName` in interface `NamedConfig`
      Parameters:
        `name` - the name of the lock
      Returns:
        the updated `LockConfig`
      Throws:
        `IllegalArgumentException` - if name is `null` or an empty string

    - #### getName

          public String getName()

      Returns the name of the lock.
      Specified by:
        `getName` in interface `NamedConfig`
      Returns:
        the name of the lock

    - #### getQuorumName

          public String getQuorumName()

      Returns the quorum name for lock operations.
      Returns:
        the quorum name

    - #### setQuorumName

          public LockConfig setQuorumName(String quorumName)

      Sets the quorum name for lock operations.
      Parameters:
        `quorumName` - the quorum name
      Returns:
        the updated lock configuration

    - #### getAsReadOnly

          public LockConfig 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

    - #### 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 © 2019. All rights reserved.