| java.lang.Object | |
| ↳ | com.pnfsoftware.jeb.core.units.PassthroughUnitLock |
Singleton. Immutable.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| ACLock |
a(long blockTimeoutMs)
Attempt to acquire an auto-closable wrapper on this unit lock.
| ||||||||||
| ACLock |
a()
Attempt to acquire an auto-closable wrapper on this unit lock.
| ||||||||||
| long |
getDefaultBlockTimeoutMs()
Get the default wait time lock acquisition will block before throwing a
UnitLockedException. | ||||||||||
| static PassthroughUnitLock | getInstance() | ||||||||||
| boolean |
isLocked()
Determine if the lock is held by _any_ thread.
| ||||||||||
| boolean |
isLockedByCurrentThread()
Determine if the lock is held by _this_ thread.
| ||||||||||
| void |
verifyLocked()
Verify that the lock is help by this thread, and raise an exception if not.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.pnfsoftware.jeb.core.units.IUnitLock
| |||||||||||
Attempt to acquire an auto-closable wrapper on this unit lock. If the lock cannot be acquired
within the provided time frame, the method will throw a UnitLockedException (see
getDefaultBlockTimeoutMs()).
Best-practice: This method must be called in a try-with-resources.
Attempt to acquire an auto-closable wrapper on this unit lock. If the lock cannot be acquired
within the time frame defined by getDefaultBlockTimeoutMs(), it will throw a
UnitLockedException (see getDefaultBlockTimeoutMs()).
Best-practice: This method must be called in a try-with-resources.
Get the default wait time lock acquisition will block before throwing a
UnitLockedException.
Determine if the lock is held by _any_ thread. Purely indicative, do not use for synchronization.
Determine if the lock is held by _this_ thread. Purely indicative, do not use for synchronization.
Verify that the lock is help by this thread, and raise an exception if not.