ZKeyedPool

zio.ZKeyedPool$
See theZKeyedPool companion trait
object ZKeyedPool

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

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$2: 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$3: 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$4: 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