trait TSet[A] extends TxnDebuggable
A transactional set implementation that requires that all of its set-like
operations be called from inside an atomic block. Rather than extending
Set
, an implicit conversion is provided from TSet
to Set
if the
current scope is part of an atomic block (see TSet.asSet
).
The elements (with type A
) must be immutable, or at least not modified
while they are in the set. The TSet
implementation assumes that it can
safely perform equality and hash checks outside a transaction without
affecting atomicity.
- Alphabetic
- By Inheritance
- TSet
- TxnDebuggable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def add(elem: A)(implicit txn: InTxn): Boolean
- abstract def contains(elem: 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 filterInPlace(p: (A) => Boolean)(implicit txn: InTxn): TSet.this.type
- abstract def foreach[U](f: (A) => U)(implicit txn: InTxn): Unit
- abstract def isEmpty(implicit txn: InTxn): Boolean
- abstract def remove(elem: A)(implicit txn: InTxn): Boolean
- abstract def single: View[A]
Returns an instance that provides transactional set functionality without requiring that operations be performed inside the static scope of an atomic block.
- abstract def size(implicit txn: InTxn): Int
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def ++=(xs: IterableOnce[A])(implicit txn: InTxn): TSet.this.type
- def +=(x: A)(implicit txn: InTxn): TSet.this.type
- def --=(xs: IterableOnce[A])(implicit txn: InTxn): TSet.this.type
- def -=(x: A)(implicit txn: InTxn): TSet.this.type
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(elem: A)(implicit txn: InTxn): Boolean
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(implicit txn: InTxn): TSet[A]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def snapshot: Set[A]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def update(elem: A, included: Boolean)(implicit txn: InTxn): Unit
- 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()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def +=(x1: A, x2: A, xs: A*)(implicit txn: InTxn): TSet.this.type
- Annotations
- @deprecated
- Deprecated
(Since version 0.8) use ++=
- def -=(x1: A, x2: A, xs: A*)(implicit txn: InTxn): TSet.this.type
- Annotations
- @deprecated
- Deprecated
(Since version 0.8) use --=
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
- final def retain(p: (A) => Boolean)(implicit txn: InTxn): TSet.this.type
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 0.8) Use .filterInPlace instead of .retain