Interface DataNodeLockManager<T extends AutoCloseDataSetLock>
- All Known Implementing Classes:
DataSetLockManager,NoLockManager
public interface DataNodeLockManager<T extends AutoCloseDataSetLock>
Use for manage a set of lock for datanode.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumAcquire block pool level and volume level lock first if you want to acquire dir lock. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLock(DataNodeLockManager.LockLevel level, String... resources) Add a lock to LockManager.voidhook()LockManager may need to back hook.readLock(DataNodeLockManager.LockLevel level, String... resources) Acquire readLock and then lock.voidremoveLock(DataNodeLockManager.LockLevel level, String... resources) Remove a lock from LockManager.writeLock(DataNodeLockManager.LockLevel level, String... resources) Acquire writeLock and then lock.
-
Method Details
-
readLock
Acquire readLock and then lock. -
writeLock
Acquire writeLock and then lock. -
addLock
Add a lock to LockManager. -
removeLock
Remove a lock from LockManager. -
hook
void hook()LockManager may need to back hook.
-