ZKeyedPool

trait ZKeyedPool[+Err, -Key, Item]
Companion:
object
class Object
trait Matchable
class Any

Value members

Abstract methods

def get(key: Key)(implicit trace: Trace): ZIO[Scope, Err, Item]

Retrieves an item from the pool belonging to the given key in a scoped effect. Note that if acquisition fails, then the returned effect will fail for that same reason. Retrying a failed acquisition attempt will repeat the acquisition attempt.

Retrieves an item from the pool belonging to the given key in a scoped effect. Note that if acquisition fails, then the returned effect will fail for that same reason. Retrying a failed acquisition attempt will repeat the acquisition attempt.

def invalidate(item: Item)(implicit trace: Trace): UIO[Unit]

Invalidates the specified item. This will cause the pool to eventually reallocate the item, although this reallocation may occur lazily rather than eagerly.

Invalidates the specified item. This will cause the pool to eventually reallocate the item, although this reallocation may occur lazily rather than eagerly.