Class/Object

zio.stm

TMap

Related Docs: object TMap | package stm

Permalink

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. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def contains(k: K): USTM[Boolean]

    Permalink

    Tests whether or not map contains a key.

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

    Permalink

    Removes binding for given key.

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

    Permalink

    Deletes all entries associated with the specified keys.

  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def find[A](pf: PartialFunction[(K, V), A]): USTM[Option[A]]

    Permalink

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

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

    Permalink

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

  14. def findAllSTM[R, E, A](pf: (K, V) ⇒ ZSTM[R, Option[E], A]): ZSTM[R, E, Chunk[A]]

    Permalink

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

  15. def findSTM[R, E, A](f: (K, V) ⇒ ZSTM[R, Option[E], A]): ZSTM[R, E, Option[A]]

    Permalink

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

  16. def fold[A](zero: A)(op: (A, (K, V)) ⇒ A): USTM[A]

    Permalink

    Atomically folds using a pure function.

  17. def foldSTM[R, E, A](zero: A)(op: (A, (K, V)) ⇒ ZSTM[R, E, A]): ZSTM[R, E, A]

    Permalink

    Atomically folds using a transactional function.

  18. def foreach[R, E](f: (K, V) ⇒ ZSTM[R, E, Unit]): ZSTM[R, E, Unit]

    Permalink

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

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

    Permalink

    Retrieves value associated with given key.

  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def getOrElse(k: K, default: ⇒ V): USTM[V]

    Permalink

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

  22. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  23. def isEmpty: USTM[Boolean]

    Permalink

    Tests if the map is empty or not

  24. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  25. def keys: USTM[List[K]]

    Permalink

    Collects all keys stored in map.

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

    Permalink

    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. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. def put(k: K, v: V): USTM[Unit]

    Permalink

    Stores new binding into the map.

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

    Permalink

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

  32. def removeIf(p: (K, V) ⇒ Boolean): USTM[Chunk[(K, V)]]

    Permalink

    Removes bindings matching predicate and returns the removed entries.

  33. def removeIfDiscard(p: (K, V) ⇒ Boolean): USTM[Unit]

    Permalink

    Removes bindings matching predicate.

  34. def retainIf(p: (K, V) ⇒ Boolean): USTM[Chunk[(K, V)]]

    Permalink

    Retains bindings matching predicate and returns removed bindings.

  35. def retainIfDiscard(p: (K, V) ⇒ Boolean): USTM[Unit]

    Permalink

    Retains bindings matching predicate.

  36. val size: USTM[Int]

    Permalink

    Returns the number of bindings.

  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  38. def takeFirst[A](pf: PartialFunction[(K, V), A]): USTM[A]

    Permalink

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

  39. def takeFirstSTM[R, E, A](pf: (K, V) ⇒ ZSTM[R, Option[E], A]): ZSTM[R, E, A]

    Permalink
  40. def takeSome[A](pf: PartialFunction[(K, V), A]): USTM[NonEmptyChunk[A]]

    Permalink

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

  41. def takeSomeSTM[R, E, A](pf: (K, V) ⇒ ZSTM[R, Option[E], A]): ZSTM[R, E, NonEmptyChunk[A]]

    Permalink

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

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

    Permalink

    Collects all bindings into a chunk.

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

    Permalink

    Collects all bindings into a list.

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

    Permalink

    Collects all bindings into a map.

  45. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  46. def transform(f: (K, V) ⇒ (K, V)): USTM[Unit]

    Permalink

    Atomically updates all bindings using a pure function.

  47. def transformSTM[R, E](f: (K, V) ⇒ ZSTM[R, E, (K, V)]): ZSTM[R, E, Unit]

    Permalink

    Atomically updates all bindings using a transactional function.

  48. def transformValues(f: (V) ⇒ V): USTM[Unit]

    Permalink

    Atomically updates all values using a pure function.

  49. def transformValuesSTM[R, E](f: (V) ⇒ ZSTM[R, E, V]): ZSTM[R, E, Unit]

    Permalink

    Atomically updates all values using a transactional function.

  50. def updateWith(k: K)(f: (Option[V]) ⇒ Option[V]): USTM[Option[V]]

    Permalink

    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.

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

    Permalink

    Collects all values stored in map.

  52. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped