Add additional java api for updated for ORMap (#25926)
* Add additional java api for updated for ORMap Existing updated is ambiguous from Java with the Scala API. * Remove warnings from DurablePruningSpec
This commit is contained in:
parent
1a25c8a5ad
commit
14377ae8cf
4 changed files with 52 additions and 3 deletions
|
|
@ -250,9 +250,20 @@ final class ORMap[A, B <: ReplicatedData] private[akka] (
|
|||
* If there is no current value for the `key` the `initial` value will be
|
||||
* passed to the `modify` function.
|
||||
*/
|
||||
@Deprecated
|
||||
@deprecated("use update for the Java API as updated is ambiguous with the Scala API", "2.5.19")
|
||||
def updated(node: Cluster, key: A, initial: B, modify: java.util.function.Function[B, B]): ORMap[A, B] =
|
||||
updated(node, key, initial)(value ⇒ modify.apply(value))
|
||||
|
||||
/**
|
||||
* Java API: Replace a value by applying the `modify` function on the existing value.
|
||||
*
|
||||
* If there is no current value for the `key` the `initial` value will be
|
||||
* passed to the `modify` function.
|
||||
*/
|
||||
def update(node: Cluster, key: A, initial: B, modify: java.util.function.Function[B, B]): ORMap[A, B] =
|
||||
updated(node, key, initial)(value ⇒ modify.apply(value))
|
||||
|
||||
/**
|
||||
* INTERNAL API
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue