LockedRedisRef
Attributes
- Source:
- RedisRef.scala
- Graph
- Supertypes
Members list
Value members
Concrete methods
Obtains a snapshot of the current value, and a setter for updating it.
Obtains a snapshot of the current value, and a setter for updating it.
The setter attempts to modify the contents from the snapshot to the new value (and return
true
). If it cannot do this (because the contents changed since taking the snapshot), the
setter is a noop and returns false
.
Satisfies: r.access.map(_._1) == r.get
and r.access.flatMap { case (v, setter) => setter(f(v)) } == r.tryUpdate(f).map(_.isDefined)
.
Attributes
- Source:
- RedisRef.scala
Obtains the current value.
Obtains the current value.
Since Ref
is always guaranteed to have a value, the returned action completes immediately
after being bound.
Attributes
- Source:
- RedisRef.scala
Like tryModify
but retries until the update has been successfully made.
Like tryModify
but retries until the update has been successfully made.
Attributes
- Source:
- RedisRef.scala
Like tryModifyState but retries the modification until successful.
Sets the current value to a
.
Sets the current value to a
.
The returned action completes after the reference has been successfully set.
Attributes
- Source:
- RedisRef.scala
Like tryUpdate
but allows the update function to return an output value of type B
. The
returned action completes with None
if the value is not updated successfully and
Some(b)
otherwise.
Like tryUpdate
but allows the update function to return an output value of type B
. The
returned action completes with None
if the value is not updated successfully and
Some(b)
otherwise.
Attributes
- Source:
- RedisRef.scala
Update the value of this Ref
with a state computation.
Update the value of this Ref
with a state computation.
The current value of this Ref
is used as the initial state and the computed output state
is stored in this Ref
after computation completes. If a concurrent modification occurs,
None
is returned.
Attributes
- Source:
- RedisRef.scala
Attempts to modify the current value once, returning false
if another concurrent
modification completes between the time the variable is read and the time it is set.
Attempts to modify the current value once, returning false
if another concurrent
modification completes between the time the variable is read and the time it is set.
Attributes
- Source:
- RedisRef.scala
Modifies the current value using the supplied update function. If another modification
occurs between the time the current value is read and subsequently updated, the
modification is retried using the new value. Hence, f
may be invoked multiple times.
Modifies the current value using the supplied update function. If another modification
occurs between the time the current value is read and subsequently updated, the
modification is retried using the new value. Hence, f
may be invoked multiple times.
Satisfies: r.update(_ => a) == r.set(a)
Attributes
- Source:
- RedisRef.scala