object Locking
Defines several convenience methods related to using (Reentrant(ReadWrite))Lock
s.
- Source
- Locking.scala
- Alphabetic
- By Inheritance
- Locking
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- 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() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- 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 functionf
is not executed andNone
is returned.Tries to acquire the read lock and then executes the function
f
; if the read lock cannot be acquired the given functionf
is not executed andNone
is returned.If lock was acquired, it will always be released before the method returns.
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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: IterableOnce[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()
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated