Lookup

sealed interface Lookup<out V : Any>(source)

What a load found: a value (Found) or a confirmed miss (Missing). A confirmed miss is a value, never null and never a failure.

Stable Core. sealed because the closed pair is the contract; a when over a Lookup needs no else.

Type Parameters

V

the type of the stored value.

Inheritors

Types

Link copied to clipboard
class Found<out V : Any>(val value: V, val weight: Int) : Lookup<V>

A value the endpoint returned, stored for the policy's ttl.

Link copied to clipboard

A confirmed miss (the endpoint declared that this answer means "nothing there"), stored for the policy's missTtl.