ZKeyedPool

zio.ZKeyedPool
See theZKeyedPool companion trait
object ZKeyedPool

Attributes

Companion
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
ZKeyedPool.type

Members list

Type members

Inherited and Abstract types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def make[Key, Env : Tag, Err, Item](get: Key => ZIO[Env, Err, Item], size: => Int)(implicit evidence$1: Tag[Env], trace: Trace): ZIO[Env & Scope, Nothing, ZKeyedPool[Err, Key, Item]]

Makes a new pool of the specified fixed size. The pool is returned in a Scope, which governs the lifetime of the pool. When the pool is shutdown because the Scope is closed, the individual items allocated by the pool will be released in some unspecified order.

Makes a new pool of the specified fixed size. The pool is returned in a Scope, which governs the lifetime of the pool. When the pool is shutdown because the Scope is closed, the individual items allocated by the pool will be released in some unspecified order.

Attributes

def make[Key, Env : Tag, Err, Item](get: Key => ZIO[Env, Err, Item], size: Key => Int)(implicit evidence$1: Tag[Env], trace: Trace): ZIO[Env & Scope, Nothing, ZKeyedPool[Err, Key, Item]]

Makes a new pool of the specified fixed size. The pool is returned in a Scope, which governs the lifetime of the pool. When the pool is shutdown because the Scope is closed, the individual items allocated by the pool will be released in some unspecified order.

Makes a new pool of the specified fixed size. The pool is returned in a Scope, which governs the lifetime of the pool. When the pool is shutdown because the Scope is closed, the individual items allocated by the pool will be released in some unspecified order.

The size of the underlying pools can be configured per key.

Attributes

def make[Key, Env : Tag, Err, Item](get: Key => ZIO[Env, Err, Item], range: => Range, timeToLive: => Duration)(implicit evidence$1: Tag[Env], trace: Trace): ZIO[Env & Scope, Nothing, ZKeyedPool[Err, Key, Item]]

Makes a new pool with the specified minimum and maximum sizes and time to live before a pool whose excess items are not being used will be shrunk down to the minimum size. The pool is returned in a Scope, which governs the lifetime of the pool. When the pool is shutdown because the Scope is used, the individual items allocated by the pool will be released in some unspecified order.

Makes a new pool with the specified minimum and maximum sizes and time to live before a pool whose excess items are not being used will be shrunk down to the minimum size. The pool is returned in a Scope, which governs the lifetime of the pool. When the pool is shutdown because the Scope is used, the individual items allocated by the pool will be released in some unspecified order.

Attributes

def make[Key, Env : Tag, Err, Item](get: Key => ZIO[Env, Err, Item], range: Key => Range, timeToLive: Key => Duration)(implicit evidence$1: Tag[Env], trace: Trace): ZIO[Env & Scope, Nothing, ZKeyedPool[Err, Key, Item]]

Makes a new pool with the specified minimum and maximum sizes and time to live before a pool whose excess items are not being used will be shrunk down to the minimum size. The pool is returned in a Scope, which governs the lifetime of the pool. When the pool is shutdown because the Scope is used, the individual items allocated by the pool will be released in some unspecified order.

Makes a new pool with the specified minimum and maximum sizes and time to live before a pool whose excess items are not being used will be shrunk down to the minimum size. The pool is returned in a Scope, which governs the lifetime of the pool. When the pool is shutdown because the Scope is used, the individual items allocated by the pool will be released in some unspecified order.

The size of the underlying pools can be configured per key.

Attributes