trait TMap[A, B] extends TxnDebuggable
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 from TMap
to Map
if the
current scope is part of an atomic block (see TMap.asMap
).
The keys (with type A
) must be immutable, or at least not modified while
they are in the map. The TMap
implementation assumes that it can safely
perform key equality and hash checks outside a transaction without
affecting atomicity.
- Alphabetic
- By Inheritance
- TMap
- TxnDebuggable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
- abstract def apply(key: A)(implicit txn: InTxn): B
- abstract def contains(key: A)(implicit txn: InTxn): Boolean
-
abstract
def
dbgStr: String
Returns a string representation of the transactional value in this instance for debugging convenience.
Returns a string representation of the transactional value in this instance for debugging convenience. The
Ref
reads (and writes) performed while constructing the result will be discarded before returning. This method works fine outside a transaction.If this method is called from within a transaction that is already doomed (status
Txn.Rolledback
), a string describing the reason for the outer transaction's rollback will be returned.- Definition Classes
- TxnDebuggable
-
abstract
def
dbgValue: Any
Returns some value that is suitable for examination in a debugger, or returns a
Txn.RollbackCause
if called from inside a doomed atomic block.Returns some value that is suitable for examination in a debugger, or returns a
Txn.RollbackCause
if called from inside a doomed atomic block.- Definition Classes
- TxnDebuggable
- abstract def foreach[U](f: ((A, B)) ⇒ U)(implicit txn: InTxn): Unit
- abstract def get(key: A)(implicit txn: InTxn): Option[B]
- abstract def isEmpty(implicit txn: InTxn): Boolean
- abstract def put(key: A, value: B)(implicit txn: InTxn): Option[B]
- abstract def remove(key: A)(implicit txn: InTxn): Option[B]
- abstract def retain(p: (A, B) ⇒ Boolean)(implicit txn: InTxn): TMap.this.type
-
abstract
def
single: View[A, B]
Returns an instance that provides transactional map functionality without requiring that operations be performed inside the static scope of an atomic block.
- abstract def size(implicit txn: InTxn): Int
- abstract def transform(f: (A, B) ⇒ B)(implicit txn: InTxn): TMap.this.type
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- 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
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(implicit txn: InTxn): TMap[A, B]
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- def snapshot: Map[A, B]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def update(key: A, value: B)(implicit txn: InTxn): Unit
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )