Packages

final class TMap[K, V] extends AnyRef

Transactional map implemented on top of TRef and TArray. Resolves conflicts via chaining.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TMap
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. def contains(k: K): USTM[Boolean]

    Tests whether or not map contains a key.

  7. def delete(k: K): USTM[Unit]

    Removes binding for given key.

  8. def deleteAll(ks: Iterable[K]): USTM[Unit]

    Deletes all entries associated with the specified keys.

  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def find[A](pf: PartialFunction[(K, V), A]): USTM[Option[A]]

    Finds the key/value pair matching the specified predicate, and uses the provided function to extract a value out of it.

  12. def findAll[A](pf: PartialFunction[(K, V), A]): USTM[Chunk[A]]

    Finds all the key/value pairs matching the specified predicate, and uses the provided function to extract values out them.

  13. def findAllSTM[R, E, A](pf: (K, V) => ZSTM[R, Option[E], A]): ZSTM[R, E, Chunk[A]]

    Finds all the key/value pairs matching the specified predicate, and uses the provided effectful function to extract values out of them..

  14. def findSTM[R, E, A](f: (K, V) => ZSTM[R, Option[E], A]): ZSTM[R, E, Option[A]]

    Finds the key/value pair matching the specified predicate, and uses the provided effectful function to extract a value out of it.

  15. def fold[A](zero: A)(op: (A, (K, V)) => A): USTM[A]

    Atomically folds using a pure function.

  16. def foldSTM[R, E, A](zero: A)(op: (A, (K, V)) => ZSTM[R, E, A]): ZSTM[R, E, A]

    Atomically folds using a transactional function.

  17. def foreach[R, E](f: (K, V) => ZSTM[R, E, Unit]): ZSTM[R, E, Unit]

    Atomically performs transactional-effect for each binding present in map.

  18. def get(k: K): USTM[Option[V]]

    Retrieves value associated with given key.

  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def getOrElse(k: K, default: => V): USTM[V]

    Retrieves value associated with given key or default value, in case the key isn't present.

  21. def getOrElseSTM[R, E](k: K, default: => ZSTM[R, E, V]): ZSTM[R, E, V]

    Retrieves value associated with given key or transactional default value, in case the key isn't present.

  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. def isEmpty: USTM[Boolean]

    Tests if the map is empty or not

  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. def keys: USTM[List[K]]

    Collects all keys stored in map.

  26. def merge(k: K, v: V)(f: (V, V) => V): USTM[V]

    If the key k is not already associated with a value, stores the provided value, otherwise merge the existing value with the new one using function f and store the result

  27. def mergeSTM[R, E](k: K, v: V)(f: (V, V) => ZSTM[R, E, V]): ZSTM[R, E, V]

    If the key k is not already associated with a value, stores the provided value, otherwise merge the existing value with the new one using transactional function f and store the result

  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. def put(k: K, v: V): USTM[Unit]

    Stores new binding into the map.

  32. def putIfAbsent(k: K, v: V): USTM[Unit]

    Stores new binding in the map if it does not already exist.

  33. def removeIf(p: (K, V) => Boolean): USTM[Chunk[(K, V)]]

    Removes bindings matching predicate and returns the removed entries.

  34. def removeIfDiscard(p: (K, V) => Boolean): USTM[Unit]

    Removes bindings matching predicate.

  35. def retainIf(p: (K, V) => Boolean): USTM[Chunk[(K, V)]]

    Retains bindings matching predicate and returns removed bindings.

  36. def retainIfDiscard(p: (K, V) => Boolean): USTM[Unit]

    Retains bindings matching predicate.

  37. val size: USTM[Int]

    Returns the number of bindings.

  38. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  39. def takeFirst[A](pf: PartialFunction[(K, V), A]): USTM[A]

    Takes the first matching value, or retries until there is one.

  40. def takeFirstSTM[R, E, A](pf: (K, V) => ZSTM[R, Option[E], A]): ZSTM[R, E, A]
  41. def takeSome[A](pf: PartialFunction[(K, V), A]): USTM[NonEmptyChunk[A]]

    Takes all matching values, or retries until there is at least one.

  42. def takeSomeSTM[R, E, A](pf: (K, V) => ZSTM[R, Option[E], A]): ZSTM[R, E, NonEmptyChunk[A]]

    Takes all matching values, or retries until there is at least one.

  43. def toChunk: USTM[Chunk[(K, V)]]

    Collects all bindings into a chunk.

  44. def toList: USTM[List[(K, V)]]

    Collects all bindings into a list.

  45. def toMap: USTM[Map[K, V]]

    Collects all bindings into a map.

  46. def toString(): String
    Definition Classes
    AnyRef → Any
  47. def transform(f: (K, V) => (K, V)): USTM[Unit]

    Atomically updates all bindings using a pure function.

  48. def transformSTM[R, E](f: (K, V) => ZSTM[R, E, (K, V)]): ZSTM[R, E, Unit]

    Atomically updates all bindings using a transactional function.

  49. def transformValues(f: (V) => V): USTM[Unit]

    Atomically updates all values using a pure function.

  50. def transformValuesSTM[R, E](f: (V) => ZSTM[R, E, V]): ZSTM[R, E, Unit]

    Atomically updates all values using a transactional function.

  51. def updateWith(k: K)(f: (Option[V]) => Option[V]): USTM[Option[V]]

    Updates the mapping for the specified key with the specified function, which takes the current value of the key as an input, if it exists, and either returns Some with a new value to indicate to update the value in the map or None to remove the value from the map.

    Updates the mapping for the specified key with the specified function, which takes the current value of the key as an input, if it exists, and either returns Some with a new value to indicate to update the value in the map or None to remove the value from the map. Returns Some with the updated value or None if the value was removed from the map.

  52. def updateWithSTM[R, E](k: K)(f: (Option[V]) => ZSTM[R, E, Option[V]]): ZSTM[R, E, Option[V]]

    Updates the mapping for the specified key with the specified transactional function, which takes the current value of the key as an input, if it exists, and either returns Some with a new value to indicate to update the value in the map or None to remove the value from the map.

    Updates the mapping for the specified key with the specified transactional function, which takes the current value of the key as an input, if it exists, and either returns Some with a new value to indicate to update the value in the map or None to remove the value from the map. Returns Some with the updated value or None if the value was removed from the map.

  53. def values: USTM[List[V]]

    Collects all values stored in map.

  54. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  55. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  56. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped