abstract class SemaphoreImpl extends Semaphore
The default implementation of Semaphore using a ListBuffer backend. maxAvailablePermits is not defined and a hook for making new permits available is provided.
- Alphabetic
- By Inheritance
- SemaphoreImpl
- Semaphore
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
Concrete 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
-
def
acquire[X](permitCount: Int)(task: ⇒ Future[X])(implicit ec: ExecutionContext): DeferredFuture[X]
- task
the task to run once permits are available
- returns
a future that completes once permitCount permits are available AND task completes. task is started once permitCount permits are available. The permits are removed from the pool while task is running and after task completes the permits are returned to the pool.
- Definition Classes
- SemaphoreImpl → Semaphore
- Exceptions thrown
java.lang.IllegalArgumentException
if the number of requested permits exceeds maxAvailablePermits
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
availablePermits(_availablePermits: Int): Unit
- Attributes
- protected
-
def
availablePermits: Int
- returns
the current number of permits available
- Definition Classes
- SemaphoreImpl → Semaphore
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @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
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
replenish(permitCount: Int)(implicit ec: ExecutionContext): Unit
- Attributes
- protected
-
def
run[X](task: ⇒ Future[X], permitCount: Int)(implicit ec: ExecutionContext): Future[X]
- Attributes
- protected
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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
- @throws( ... )
-
def
waitQueueLength: Int
- returns
the count of callers currently waiting on permits to become available
- Definition Classes
- SemaphoreImpl → Semaphore