FutureWrapper

com.phasmidsoftware.lascala.cache.FutureWrapper
class FutureWrapper(implicit ec: ExecutionContext, atMost: Duration) extends Wrapper[Future]

A concrete Wrapper which wraps with a Future

Value parameters

atMost

a (implicit) duration used by the get method

ec

an (implicit) execution context

Attributes

Graph
Supertypes
trait Wrapper[Future]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def flatMap[V](m: Future[V], f: V => Future[V]): Future[V]

Return an M[V], given an M[V] and a V=>M[V] function

Return an M[V], given an M[V] and a V=>M[V] function

CONSIDER defining this as flatMap[V,W] etc.

Type parameters

V

the value type

Value parameters

m

the M[V] to be mapped

Attributes

Returns

an M[V]

def get[V](m: Future[V]): V

Unwrap a V value from inside the given m

Unwrap a V value from inside the given m

Type parameters

V

the value type

Value parameters

m

an M[V]

Attributes

Returns

the unwrapped V value

def unit[V](v: => V): Future[V]

Return an M[V], given v

Return an M[V], given v

Type parameters

V

the value type

Value parameters

v

the value

Attributes

Returns

an M[V]

Inherited methods

def map[V](m: Future[V], f: V => V): Future[V]

Just for convenience, here is map defined in terms of flatMap and unit

Just for convenience, here is map defined in terms of flatMap and unit

Type parameters

V

the value type

Value parameters

f

the mapping function, which is a V=>V

m

the M[V] to be mapped

Attributes

Returns

an M[V]

Inherited from:
Wrapper