public class TsFileLock extends Object
When the query thread crashes, the locks it used can no longer be unlocked by itself and another thread must do the unlock for it. Unfortunately, normal Java ReentrantLock can only be unlocked by the thread which locked it, so we have to use a different implementation. It is also interesting to use a third-party implementation and if you do find a better one, please submit an issue on our website.
WARNING: as the lock holder is not recorded, the caller must assure that lock() and unlock() match, i.e., if you only call lock() once then do not call unlock() more than once and vice versa.
| 构造器和说明 |
|---|
TsFileLock() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
readLock() |
void |
readUnlock() |
boolean |
tryReadLock() |
boolean |
tryWriteLock() |
void |
writeLock() |
void |
writeUnlock() |
Copyright © 2022 The Apache Software Foundation. All rights reserved.