final case class GSet[A](elements: Set[A]) extends ReplicatedData with ReplicatedDataSerialization with FastMerge with Product with Serializable

Implements a 'Add Set' CRDT, also called a 'G-Set'. You can't remove elements of a G-Set.

It is described in the paper A comprehensive study of Convergent and Commutative Replicated Data Types.

A G-Set doesn't accumulate any garbage apart from the elements themselves.

This class is immutable, i.e. "modifying" methods return a new instance.

Annotations
@SerialVersionUID()
Source
GSet.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GSet
  2. Product
  3. Equals
  4. FastMerge
  5. ReplicatedDataSerialization
  6. Serializable
  7. Serializable
  8. ReplicatedData
  9. AnyRef
  10. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GSet(elements: Set[A])

Type Members

  1. type T = GSet[A]

    The type of the concrete implementation, e.g.

    The type of the concrete implementation, e.g. GSet[A]. To be specified by subclass.

    Definition Classes
    GSetReplicatedData

Value Members

  1. def +(element: A): GSet[A]

    Adds an element to the set

  2. def add(element: A): GSet[A]

    Adds an element to the set

  3. def contains(a: A): Boolean
  4. val elements: Set[A]
  5. def getElements(): Set[A]

    Java API

  6. def isEmpty: Boolean
  7. def merge(that: GSet[A]): GSet[A]

    Monotonic merge function.

    Monotonic merge function.

    Definition Classes
    GSetReplicatedData
  8. def size: Int