sealed trait DeferredMap[F[_], K, V, D <: Deferred[F, V]] extends AnyRef
A map with values that may or may not be completed
- Alphabetic
- By Inheritance
- DeferredMap
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
add(k: K)(d: D): F[Unit]
Add a value to this map that may be completed later.
Add a value to this map that may be completed later. If this key is already being awaited by another Deferred, it will attempt to complete the value silently.
-
abstract
def
addF(k: K)(f: F[V]): F[Unit]
Add a value to this map once a given
Fcompletes.Add a value to this map once a given
Fcompletes. If this key is already being awaited, it will attempt to complete the value silently. -
abstract
def
addPure(k: K)(v: V): F[Unit]
Add a pure value to this map that is pre-completed.
Add a pure value to this map that is pre-completed. If this key is being awaited, it will attempt to complete the deferred upon insert silently.
-
abstract
def
del(k: K): F[Boolean]
Remove a value from this map.
Remove a value from this map. Result is whether or not the key was valid.
-
abstract
def
get(k: K): F[V]
Get the value for a given key asynchronously once it is available.
-
abstract
def
getDeferred(k: K): F[D]
Get a
Deferredthat completes when the requested value is available. -
abstract
def
getDeferredOpt(k: K): F[Option[D]]
Get a
Deferredthat completes when the requested value is available if the given key currently exists. -
abstract
def
getDeferredOrAdd(k: K)(d: D): F[D]
Like
getDeferred, but if the given key does not exist the providedDeferredis added/returned. -
abstract
def
getOpt(k: K): F[Option[V]]
Get the value for a given key asynchronously only if the key currently exists.
Get the value for a given key asynchronously only if the key currently exists. This means if a value is currently being awaited, you will eventually receive
Somevalue. Otherwise, it will immediately returnNone. -
abstract
def
getOrAdd(k: K)(d: D): F[V]
If the given key exists, await its final value.
If the given key exists, await its final value. Otherwise, the provided deferred will be awaited and added to the map immediately.
-
abstract
def
getOrAddF(k: K)(f: F[V]): F[V]
If the given key exists, await its final value.
If the given key exists, await its final value. Otherwise, the provided effect will be evaluated to obtain that value. A Deferred is created internally so that the result can be awaited as it is evaluated.
-
abstract
def
getOrAddPure(k: K)(v: V): F[V]
If the given key exists, await its final value.
If the given key exists, await its final value. Otherwise, the provided pure value
vwill be added to the map.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.