scala.concurrent.stm
trait
TMap
[A, B]
extends AnyRef
Abstract Value Members
-
def
apply
(key: A)(implicit txn: InTxn): B
-
def
contains
(key: A)(implicit txn: InTxn): Boolean
-
def
foreach
[U]
(f: ((A, B)) ⇒ U)(implicit txn: InTxn): Unit
-
def
get
(key: A)(implicit txn: InTxn): Option[B]
-
def
isEmpty
(implicit txn: InTxn): Boolean
-
def
put
(key: A, value: B)(implicit txn: InTxn): Option[B]
-
def
remove
(key: A)(implicit txn: InTxn): Option[B]
-
def
retain
(p: (A, B) ⇒ Boolean)(implicit txn: InTxn): TMap.this.type
-
def
single
: View[A, B]
-
def
size
(implicit txn: InTxn): Int
-
def
transform
(f: (A, B) ⇒ B)(implicit txn: InTxn): TMap.this.type
Concrete Value Members
-
def
!=
(arg0: AnyRef): Boolean
-
def
!=
(arg0: Any): Boolean
-
def
##
(): Int
-
def
++=
(kvs: TraversableOnce[(A, B)])(implicit txn: InTxn): TMap.this.type
-
def
+=
(kv1: (A, B), kv2: (A, B), kvs: (A, B)*)(implicit txn: InTxn): TMap.this.type
-
def
+=
(kv: (A, B))(implicit txn: InTxn): TMap.this.type
-
def
--=
(ks: TraversableOnce[A])(implicit txn: InTxn): TMap.this.type
-
def
-=
(k1: A, k2: A, ks: A*)(implicit txn: InTxn): TMap.this.type
-
def
-=
(k: A)(implicit txn: InTxn): TMap.this.type
-
def
==
(arg0: AnyRef): Boolean
-
def
==
(arg0: Any): Boolean
-
def
asInstanceOf
[T0]
: T0
-
def
clone
(implicit txn: InTxn): TMap[A, B]
-
def
clone
(): AnyRef
-
def
eq
(arg0: AnyRef): Boolean
-
def
equals
(arg0: Any): Boolean
-
def
finalize
(): Unit
-
def
getClass
(): java.lang.Class[_]
-
def
hashCode
(): Int
-
def
isInstanceOf
[T0]
: Boolean
-
def
ne
(arg0: AnyRef): Boolean
-
def
notify
(): Unit
-
def
notifyAll
(): Unit
-
def
synchronized
[T0]
(arg0: ⇒ T0): T0
-
def
toString
(): String
-
def
update
(key: A, value: B)(implicit txn: InTxn): Unit
-
def
wait
(): Unit
-
def
wait
(arg0: Long, arg1: Int): Unit
-
def
wait
(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
A transactional map implementation that requires that all of its map-like operations be called from inside an atomic block. Rather than extending
Map
, an implicit conversion is provided fromTMap
toMap
if the current scope is part of an atomic block (seeTMap.asMap
).The keys (with type
A
) must be immutable, or at least not modified while they are in the map. TheTMap
implementation assumes that it can safely perform key equality and hash checks outside a transaction without affecting atomicity.