Memoize

jam.monad.Reval$.Memoize
final case class Memoize[F[_], +A](s: Reval[F, A], key: Object) extends Reval[F, A]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Reval[F, A]
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Inherited methods

def asResource: Resource[F, A]

Represents a reval as a cats.effect.Resource.

Represents a reval as a cats.effect.Resource.

Attributes

Inherited from:
Reval
def attempt[E](implicit F: ApplicativeError[F, E]): Reval[F, Either[E, A]]

Attributes

Inherited from:
Reval
def combine[B >: A : Semigroup](that: Reval[F, B]): Reval[F, B]

Attributes

Inherited from:
Reval
def flatMap[B](f: A => Reval[F, B]): Reval[F, B]

Attributes

Inherited from:
Reval
def handleErrorWith[B >: A, E](f: E => Reval[F, B])(implicit E: ApplicativeError[F, E]): Reval[F, B]

Attributes

Inherited from:
Reval
def map[B](f: A => B): Reval[F, B]

Attributes

Inherited from:
Reval
def memoize[B](implicit ev: A <:< B, B: RevalKeyGen[B]): Reval[F, B]

Ensures that the object will be allocated once.

Ensures that the object will be allocated once.

Attributes

Inherited from:
Reval
def postFinalize(f: F[Unit])(implicit F: Applicative[F]): Reval[F, A]

Evaluates f after the object finalizer is called.

Evaluates f after the object finalizer is called.

Attributes

Inherited from:
Reval
def preAllocate(f: F[Unit]): Reval[F, A]

Evaluates f before the object is allocated.

Evaluates f before the object is allocated.

Attributes

Inherited from:
Reval
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def thunkPostFinalize(f: => Unit)(implicit F: Sync[F]): Reval[F, A]

Attributes

Inherited from:
Reval
def thunkPreAllocate(f: => Unit)(implicit F: Sync[F]): Reval[F, A]

Attributes

Inherited from:
Reval
def use[B](f: A => F[B])(implicit F: MonadCancel[F, Throwable]): F[B]

Allocates an object and supplies it to the given function. The finalizer is called as soon as the resulting F[B] is completed, whether normally or as a raised error.

Allocates an object and supplies it to the given function. The finalizer is called as soon as the resulting F[B] is completed, whether normally or as a raised error.

Attributes

Inherited from:
Reval
def usePure[B](implicit ev: A <:< B, F: MonadCancel[F, Throwable]): F[B]

Attributes

Inherited from:
Reval