AutoCloseDataSetLock (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.common, class: AutoCloseDataSetLock

Package org.apache.hadoop.hdfs.server.common

# Class AutoCloseDataSetLock

java.lang.Object
org.apache.hadoop.util.AutoCloseableLock
org.apache.hadoop.hdfs.server.common.AutoCloseDataSetLock

All Implemented Interfaces:
  `AutoCloseable`

public class AutoCloseDataSetLock extends org.apache.hadoop.util.AutoCloseableLock
Extending AutoCloseableLock such that the users can use a try-with-resource syntax.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AutoCloseDataSetLock(Lock lock)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `void`
  `lock()`
  Actually acquire the lock.
  `void`
  `setDataNodeLockManager(DataNodeLockManager<AutoCloseDataSetLock> dataNodeLockManager)`
  `void`
  `setParentLock(AutoCloseDataSetLock parent)`

  ### Methods inherited from class org.apache.hadoop.util.AutoCloseableLock

  `acquire, newCondition, release, tryLock`

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

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

- ## Constructor Details

  - ### AutoCloseDataSetLock

    public AutoCloseDataSetLock(Lock lock)

- ## Method Details

  - ### close

    public void close()
    Specified by:
      `close` in interface `AutoCloseable`
    Overrides:
      `close` in class `org.apache.hadoop.util.AutoCloseableLock`

  - ### lock

    public void lock()
    Actually acquire the lock.

  - ### setParentLock

    public void setParentLock(AutoCloseDataSetLock parent)

  - ### setDataNodeLockManager

    public void setDataNodeLockManager(DataNodeLockManager<AutoCloseDataSetLock> dataNodeLockManager)