Packages

class AsyncResourcePool[F[_], T] extends AnyRef

Asynchronous non-blocking resource pool with lifetime control.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AsyncResourcePool
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AsyncResourcePool(name: String, factory: ⇒ F[T], currentNanos: () ⇒ F[Long], maxCount: Int, maxIdleTime: FiniteDuration)(implicit arg0: Effect[F], arg1: Close[F, T], reporter: Reporter)

Type Members

  1. type DisposePromise = (Either[Throwable, Unit]) ⇒ Unit
  2. case class PoolItem(idle: Long = 0L, value: T) extends Product with Serializable
  3. 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
  4. type Promise = (Either[Throwable, Borrow[F, T]]) ⇒ Unit

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. 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

  6. def cleanup(): F[Int]
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  8. def dispose(): F[Unit]
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def onDispose(): F[Unit]
  18. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. def unsafeGetState: PoolState

    For debug purposes only

  21. def use[R](f: (T) ⇒ F[R]): F[R]
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped