|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terracotta.collections.FinegrainedLockNoDso
public class FinegrainedLockNoDso
| Constructor Summary | |
|---|---|
FinegrainedLockNoDso()
|
|
| Method Summary | |
|---|---|
boolean |
isHeldByCurrentThread()
Indicates whether the current thread is holding a lock that corresponds to this granularity and default lock type. |
boolean |
isHeldByCurrentThread(LockType lockType)
Indicates whether the current thread is holding a lock that corresponds to this granularity and specified lock type. |
void |
lock()
Lock the underlying data structure for this lock's granularity using the default lock type. |
void |
lock(LockType lockType)
Lock the underlying data structure for this lock's granularity with a specified lock type. |
boolean |
tryLock()
Lock the underlying data structure for this lock's granularity using the default lock type only if the lock is not held by another thread at the time of invocation. |
boolean |
tryLock(LockType lockType)
Lock the underlying data structure for this lock's granularity with a specified lock type only if the lock is not held by another thread at the time of invocation. |
boolean |
tryLock(LockType lockType,
long timeout,
TimeUnit unit)
Lock the underlying data structure for this lock's granularity with a specified lock type only if the lock is not held by another thread within a given time. |
boolean |
tryLock(long timeout,
TimeUnit unit)
Lock the underlying data structure for this lock's granularity using the default lock type only if the lock is not held by another thread within a given time. |
void |
unlock()
Unlocks the underlying data structure for this lock's granularity using the default lock type. |
void |
unlock(LockType lockType)
Unlocks the underlying data structure for this lock's granularity using the specified lock type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FinegrainedLockNoDso()
| Method Detail |
|---|
public void lock()
FinegrainedLock
lock in interface FinegrainedLockpublic void lock(LockType lockType)
FinegrainedLock
lock in interface FinegrainedLocklockType - the type of lock that needs to be lockedpublic void unlock()
FinegrainedLock
unlock in interface FinegrainedLockpublic void unlock(LockType lockType)
FinegrainedLock
unlock in interface FinegrainedLocklockType - the type of lock that needs to be unlockedpublic boolean tryLock()
FinegrainedLock
tryLock in interface FinegrainedLocktrue if the lock was successfully acquired; or {@code false) otherwisepublic boolean tryLock(LockType lockType)
FinegrainedLock
tryLock in interface FinegrainedLocklockType - the type of lock that needs to be locked
true if the lock was successfully acquired; or {@code false) otherwise
public boolean tryLock(long timeout,
TimeUnit unit)
FinegrainedLock
tryLock in interface FinegrainedLocktimeout - the time to waitunit - the time unit of the timeout argument
true if the lock was successfully acquired; or {@code false) otherwise
public boolean tryLock(LockType lockType,
long timeout,
TimeUnit unit)
FinegrainedLock
tryLock in interface FinegrainedLocklockType - the type of lock that needs to be lockedtimeout - the time to waitunit - the time unit of the timeout argument
true if the lock was successfully acquired; or {@code false) otherwisepublic boolean isHeldByCurrentThread()
FinegrainedLock
isHeldByCurrentThread in interface FinegrainedLocktrue if the current thread is holding the lock; or false otherwisepublic boolean isHeldByCurrentThread(LockType lockType)
FinegrainedLock
isHeldByCurrentThread in interface FinegrainedLocklockType - the type of lock that needs to be checked
true if the current thread is holding the lock; or false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||