object Locking
Defines several convenience methods related to using (Reentrant(ReadWrite))Locks.
- Alphabetic
- By Inheritance
- Locking
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
tryWithReadLock[B](rwLock: ReentrantReadWriteLock)(f: ⇒ B): Option[B]
Tries to acquire the read lock and then executes the function
f; if the read lock cannot be acquired the given functionfis not executed andNoneis returned.Tries to acquire the read lock and then executes the function
f; if the read lock cannot be acquired the given functionfis not executed andNoneis returned.If lock was acquired, it will always be released before the method returns.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
withLock[B](lock: ReentrantLock)(f: ⇒ B): B
Acquires the lock and then executes the function
f.Acquires the lock and then executes the function
f. Before returning the lock is always released.- Annotations
- @inline()
-
final
def
withReadLock[B](rwLock: ReentrantReadWriteLock)(f: ⇒ B): B
Acquires the read lock and then executes the function
f.Acquires the read lock and then executes the function
f. Before returning the lock is always released.- Annotations
- @inline()
-
final
def
withWriteLock[B](rwLock: ReentrantReadWriteLock)(f: ⇒ B): B
Acquires the write lock associated with this instance and then executes the function
f.Acquires the write lock associated with this instance and then executes the function
f. Afterwards, the lock is released.- Annotations
- @inline()
-
final
def
withWriteLocks[T](rwLocks: TraversableOnce[ReentrantReadWriteLock])(f: ⇒ T): T
Acquires all given locks in the given order and then executes the given function
f.Acquires all given locks in the given order and then executes the given function
f. Afterwards all locks are released in reverse order.- Annotations
- @inline()