class ReplicatedCounterMap[K] extends InternalReplicatedData
A Map of counters. Uses kalix.scalasdk.replicatedentity.ReplicatedCounter 's as values.
- K
The type for keys.
- Alphabetic
- By Inheritance
- ReplicatedCounterMap
- InternalReplicatedData
- InternalReplicatedData
- ReplicatedData
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Type Members
- final type Self = ReplicatedCounterMap[K]
- Definition Classes
- ReplicatedCounterMap → InternalReplicatedData
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from ReplicatedCounterMap[K] toany2stringadd[ReplicatedCounterMap[K]] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
- def ->[B](y: B): (ReplicatedCounterMap[K], B)
- Implicit
- This member is added by an implicit conversion from ReplicatedCounterMap[K] toArrowAssoc[ReplicatedCounterMap[K]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(key: K): Long
Get the counter value for the given key.
Get the counter value for the given key.
- key
the key to get the value for
- returns
the current value of the counter at that key, or zero if no counter exists
- final def applyDelta: PartialFunction[Delta, ReplicatedCounterMap[K]]
- Definition Classes
- ReplicatedCounterMap → InternalReplicatedData
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clear(): ReplicatedCounterMap[K]
Remove all mappings from this counter map.
Remove all mappings from this counter map.
- returns
a new empty counter map
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def contains(key: K): Boolean
Check whether this counter map contains a mapping for the given key.
Check whether this counter map contains a mapping for the given key.
- key
key whose presence in this map is to be tested
- returns
true
if this counter map contains a mapping for the given key
- def decrement(key: K, amount: Long): ReplicatedCounterMap[K]
Decrement the counter at the given key by the given amount.
Decrement the counter at the given key by the given amount.
The counter will be created if it is not already in the map.
- key
the key of the counter
- amount
the amount to decrement by
- returns
a new counter map with the decremented value
- val delegate: ReplicatedCounterMapImpl[K]
- Definition Classes
- ReplicatedCounterMap → InternalReplicatedData
- def ensuring(cond: (ReplicatedCounterMap[K]) => Boolean, msg: => Any): ReplicatedCounterMap[K]
- Implicit
- This member is added by an implicit conversion from ReplicatedCounterMap[K] toEnsuring[ReplicatedCounterMap[K]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (ReplicatedCounterMap[K]) => Boolean): ReplicatedCounterMap[K]
- Implicit
- This member is added by an implicit conversion from ReplicatedCounterMap[K] toEnsuring[ReplicatedCounterMap[K]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): ReplicatedCounterMap[K]
- Implicit
- This member is added by an implicit conversion from ReplicatedCounterMap[K] toEnsuring[ReplicatedCounterMap[K]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): ReplicatedCounterMap[K]
- Implicit
- This member is added by an implicit conversion from ReplicatedCounterMap[K] toEnsuring[ReplicatedCounterMap[K]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def forall(predicate: ((K, Long)) => Boolean): Boolean
Tests whether a predicate holds for all elements of this ReplicatedCounterMap.
Tests whether a predicate holds for all elements of this ReplicatedCounterMap.
- predicate
the predicate used to test elements.
- returns
true
if this ReplicatedCounterMap is empty or the given predicatepred
holds for all elements of this ReplicatedCounterMap, otherwisefalse
.
- def get(key: K): Option[Long]
Optionally returns the value associated with a key.
Optionally returns the value associated with a key.
- key
the key value
- returns
an option value containing the value associated with
key
in this map, orNone
if none exists.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getDelta: Delta
- Definition Classes
- InternalReplicatedData → InternalReplicatedData
- def hasDelta: Boolean
- Definition Classes
- InternalReplicatedData → InternalReplicatedData
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def increment(key: K, amount: Long): ReplicatedCounterMap[K]
Increment the counter at the given key by the given amount.
Increment the counter at the given key by the given amount.
The counter will be created if it is not already in the map.
- key
the key of the counter
- amount
the amount to increment by
- returns
a new counter map with the incremented value
- def isEmpty: Boolean
Check whether this counter map is empty.
Check whether this counter map is empty.
- returns
true
if this counter map contains no key-counter mappings
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def keySet: Set[K]
Get a scala.collection.immutable.Set view of the keys contained in this counter map.
Get a scala.collection.immutable.Set view of the keys contained in this counter map.
- returns
the keys contained in this counter map
- def name: String
- Definition Classes
- InternalReplicatedData → InternalReplicatedData
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def remove(key: K): ReplicatedCounterMap[K]
Remove the mapping for a key if it is present.
Remove the mapping for a key if it is present.
- key
key whose mapping is to be removed from the map
- returns
a new counter map with the removed mapping
- final def resetDelta(): ReplicatedCounterMap[K]
- Definition Classes
- ReplicatedCounterMap → InternalReplicatedData
- def size: Int
Get the number of key-counter mappings in this counter map.
Get the number of key-counter mappings in this counter map.
- returns
the number of key-counter mappings in this counter map
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def toString(): String
- Definition Classes
- ReplicatedCounterMap → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from ReplicatedCounterMap[K] toStringFormat[ReplicatedCounterMap[K]] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (ReplicatedCounterMap[K], B)
- Implicit
- This member is added by an implicit conversion from ReplicatedCounterMap[K] toArrowAssoc[ReplicatedCounterMap[K]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.