net.sf.asyncobjects.asyncscala.util

Semaphore

class Semaphore extends ASemaphore

Implementation of semaphore service

Linear Supertypes
ASemaphore, Asynchronous, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Semaphore
  2. ASemaphore
  3. Asynchronous
  4. AnyRef
  5. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Semaphore (permits: Int)

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def acquire (amount: Int): Promise[Unit]

    Acquire the specified amount of permits.

    Acquire the specified amount of permits. The operation waits until the specified amount of permits will be available, after that the amount of available permits is increased by the specified amount.

    amount

    the amount or permits requested

    returns

    a promise that resolves when permits are taken

    Definition Classes
    SemaphoreASemaphore
  7. def acquire : Promise[Unit]

    The variant of acquire operation that takes a single permit

    The variant of acquire operation that takes a single permit

    returns

    a promise that resolve when permit is acquired

    Definition Classes
    ASemaphore
  8. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  9. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  10. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  11. def equals (arg0: Any): Boolean

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

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef
  14. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  15. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  16. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  17. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  18. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  19. var permits : Int

  20. def reduce (amount: Int): Promise[Unit]

    Reduce the amount of available permits by the specified amount.

    Reduce the amount of available permits by the specified amount. This operation does not waits until the amount of permits is available, but it waits until all previously registered acquire and reduce requests are processed. Using negative permits it is possible to track some some interesting conditions like amount of started worker operations.

    amount

    the amount or permits requested

    returns

    a promise that resolves when permits are taken

    Definition Classes
    SemaphoreASemaphore
  21. def reduce (): Promise[Unit]

    Reduce by one permit

    Reduce by one permit

    returns

    a promise that resolve when permit is reduced

    Definition Classes
    ASemaphore
  22. def release (amount: Int): Promise[Unit]

    Release the specified amount of permits.

    Release the specified amount of permits. If there are waiting acquire and reduce operations, they are resumed if the specified amount of permits allows it.

    amount

    the amount or permits released

    returns

    a promise that resolves when permits are released

    Definition Classes
    SemaphoreASemaphore
  23. def release (): Promise[Unit]

    release a single permit

    release a single permit

    returns

    a promise that resolves when a permit is released

    Definition Classes
    ASemaphore
  24. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  25. def toString (): String

    Definition Classes
    AnyRef → Any
  26. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from ASemaphore

Inherited from Asynchronous

Inherited from AnyRef

Inherited from Any