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 -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidlock()Actually acquire the lock.voidsetDataNodeLockManager(DataNodeLockManager<AutoCloseDataSetLock> dataNodeLockManager) voidsetParentLock(AutoCloseDataSetLock parent) Methods inherited from class org.apache.hadoop.util.AutoCloseableLock
acquire, newCondition, release, tryLock
-
Constructor Details
-
AutoCloseDataSetLock
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classorg.apache.hadoop.util.AutoCloseableLock
-
lock
public void lock()Actually acquire the lock. -
setParentLock
-
setDataNodeLockManager
-