Package

io.chrisdavenport

keypool

Permalink

package keypool

Visibility
  1. Public
  2. All

Type Members

  1. final class KeyPool[F[_], Key, Rezource] extends AnyRef

    Permalink

    This pools internal guarantees are that the max number of values are in the pool at any time, not maximum number of operations.

    This pools internal guarantees are that the max number of values are in the pool at any time, not maximum number of operations. To do the latter application level bounds should be used.

    A background reaper thread is kept alive for the length of the key pools life.

    When resources are taken from the pool they are received as a Managed. This Managed has a Ref to a Reusable which indicates whether or not the pool can reuse the resource.

    (I have a commented create function introducing this functionality here, so it may be introduced later.)

  2. final class Managed[F[_], Rezource] extends AnyRef

    Permalink

    A managed Resource.

    A managed Resource.

    This knows whether it was reused or not, and has a reference that when it leaves the controlling scope will dictate whether it is shutdown or returned to the pool.

  3. sealed trait Reusable extends AnyRef

    Permalink

    Reusable is a Coproduct of the two states a Resource can be in at the end of its lifetime.

    Reusable is a Coproduct of the two states a Resource can be in at the end of its lifetime.

    If it is Reuse then it will be attempted to place back in the pool, if it is in DontReuse the resource will be shutdown.

Value Members

  1. object DontReuse extends Reusable with Product with Serializable

    Permalink
  2. object KeyPool

    Permalink
  3. object Reuse extends Reusable with Product with Serializable

    Permalink

Ungrouped