Class

molecule.utils

Mutex

Related Doc: package utils

Permalink

final class Mutex extends AbstractQueuedSynchronizer

A simple non-reentrant lock used for exclusion when managing queues and workers. We use a custom lock so that we can readily probe lock state in constructions that check among alternative actions. The lock is normally only very briefly held, and sometimes treated as a spinlock, but other usages block to reduce overall contention in those cases where locked code bodies perform allocation/resizing.

Code and comments borrowed from Doug Lea's FJPool.

Linear Supertypes
AbstractQueuedSynchronizer, AbstractOwnableSynchronizer, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Mutex
  2. AbstractQueuedSynchronizer
  3. AbstractOwnableSynchronizer
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Mutex()

    Permalink

Type Members

  1. class ConditionObject extends Condition with Serializable

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object ConditionObject

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  5. final def acquire(arg0: Int): Unit

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  6. final def acquireInterruptibly(arg0: Int): Unit

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
    Annotations
    @throws( ... )
  7. final def acquireShared(arg0: Int): Unit

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  8. final def acquireSharedInterruptibly(arg0: Int): Unit

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
    Annotations
    @throws( ... )
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def compareAndSetState(arg0: Int, arg1: Int): Boolean

    Permalink
    Attributes
    protected[java.util.concurrent.locks]
    Definition Classes
    AbstractQueuedSynchronizer
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def getExclusiveOwnerThread(): Thread

    Permalink
    Attributes
    protected[java.util.concurrent.locks]
    Definition Classes
    AbstractOwnableSynchronizer
  17. final def getExclusiveQueuedThreads(): Collection[Thread]

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  18. final def getFirstQueuedThread(): Thread

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  19. final def getQueueLength(): Int

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  20. final def getQueuedThreads(): Collection[Thread]

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  21. final def getSharedQueuedThreads(): Collection[Thread]

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  22. final def getState(): Int

    Permalink
    Attributes
    protected[java.util.concurrent.locks]
    Definition Classes
    AbstractQueuedSynchronizer
  23. final def getWaitQueueLength(arg0: ConditionObject): Int

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  24. final def getWaitingThreads(arg0: ConditionObject): Collection[Thread]

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  25. final def hasContended(): Boolean

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  26. final def hasQueuedPredecessors(): Boolean

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  27. final def hasQueuedThreads(): Boolean

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  28. final def hasWaiters(arg0: ConditionObject): Boolean

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  29. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  30. final def isHeldExclusively(): Boolean

    Permalink
    Definition Classes
    Mutex → AbstractQueuedSynchronizer
  31. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  32. final def isQueued(arg0: Thread): Boolean

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  33. final def lock(): Unit

    Permalink
  34. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  35. final def newCondition(): Condition

    Permalink
  36. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  37. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  38. final def owns(arg0: ConditionObject): Boolean

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  39. final def release(arg0: Int): Boolean

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  40. final def releaseShared(arg0: Int): Boolean

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
  41. final def setExclusiveOwnerThread(arg0: Thread): Unit

    Permalink
    Attributes
    protected[java.util.concurrent.locks]
    Definition Classes
    AbstractOwnableSynchronizer
  42. final def setState(arg0: Int): Unit

    Permalink
    Attributes
    protected[java.util.concurrent.locks]
    Definition Classes
    AbstractQueuedSynchronizer
  43. final def spinLock(): Unit

    Permalink
  44. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  45. def toString(): String

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer → AnyRef → Any
  46. final def tryAcquire(ignore: Int): Boolean

    Permalink
    Definition Classes
    Mutex → AbstractQueuedSynchronizer
  47. final def tryAcquireNanos(arg0: Int, arg1: Long): Boolean

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
    Annotations
    @throws( ... )
  48. def tryAcquireShared(arg0: Int): Int

    Permalink
    Attributes
    protected[java.util.concurrent.locks]
    Definition Classes
    AbstractQueuedSynchronizer
  49. final def tryAcquireSharedNanos(arg0: Int, arg1: Long): Boolean

    Permalink
    Definition Classes
    AbstractQueuedSynchronizer
    Annotations
    @throws( ... )
  50. final def tryRelease(ignore: Int): Boolean

    Permalink
    Definition Classes
    Mutex → AbstractQueuedSynchronizer
  51. def tryReleaseShared(arg0: Int): Boolean

    Permalink
    Attributes
    protected[java.util.concurrent.locks]
    Definition Classes
    AbstractQueuedSynchronizer
  52. final def unlock(): Unit

    Permalink
  53. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AbstractQueuedSynchronizer

Inherited from AbstractOwnableSynchronizer

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped