public class OneShotLock extends LockSupport
Constructor and Description |
---|
OneShotLock() |
Modifier and Type | Method and Description |
---|---|
void |
check()
Checks to see if the lock has been set (via
lock() ). |
void |
lock()
Checks the lock, then sets it.
|
acquireReadLock, downgradeWriteLockToReadLock, releaseReadLock, releaseWriteLock, takeWriteLock, upgradeReadLockToWriteLock
public OneShotLock()
public void check()
lock()
).IllegalStateException
- if the lock is setpublic void lock()
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.