class AsyncResourcePool[F[_], T] extends AnyRef
Asynchronous non-blocking resource pool with lifetime control.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- AsyncResourcePool
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
Type Members
- type DisposePromise = (Either[Throwable, Unit]) ⇒ Unit
- case class PoolItem(idle: Long = 0L, value: T) extends Product with Serializable
- case class PoolState(total: Int = 0, items: List[PoolItem] = Nil, cbs: List[Promise] = Nil, closedItems: TreeSet[Int] = TreeSet.empty, disposeCbs: List[DisposePromise] = Nil, disposed: Boolean = false) extends Product with Serializable
- type Promise = (Either[Throwable, Borrow[F, T]]) ⇒ Unit
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
borrow(): F[Borrow[F, T]]
Borrow item from the pool.
Borrow item from the pool. 1. Borrow one of idle items if it exists 2. Otherwise try to creates one using factory 3. If maxCount is reached, waits until one of borrowed items would given back
- def cleanup(): F[Int]
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- def dispose(): F[Unit]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def onDispose(): F[Unit]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unsafeGetState: PoolState
For debug purposes only
- def use[R](f: (T) ⇒ F[R]): F[R]
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated