Package akka.cluster.ddata
Class GSet<A>
- java.lang.Object
- 
- akka.cluster.ddata.GSet<A>
 
- 
- All Implemented Interfaces:
- DeltaReplicatedData,- FastMerge,- ReplicatedData,- ReplicatedDataSerialization,- ReplicatedDelta,- java.io.Serializable,- scala.Equals,- scala.Product
 
 public final class GSet<A> extends java.lang.Object implements DeltaReplicatedData, ReplicatedDelta, ReplicatedDataSerialization, FastMerge, scala.Product, java.io.Serializable - See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description GSet()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GSet<A>$plus(A element)Adds an element to the setGSet<A>add(A element)Adds an element to the setstatic GSet<java.lang.Object>apply()static <A> GSet<A>apply(scala.collection.immutable.Set<A> elements, scala.Option<GSet<A>> delta)Implements a 'Add Set' CRDT, also called a 'G-Set'.booleancanEqual(java.lang.Object x$1)booleancontains(A a)GSet<A>copy(scala.collection.immutable.Set<A> e)static <A> GSet<A>create()Java APIscala.Option<GSet<A>>delta()The accumulated delta of mutator operations since previousDeltaReplicatedData.resetDelta().scala.collection.immutable.Set<A>elements()static <A> GSet<A>empty()booleanequals(java.lang.Object x$1)java.util.Set<A>getElements()Java APIinthashCode()booleanisEmpty()GSet<A>merge(GSet<A> that)GSet<A>mergeDelta(GSet<A> thatDelta)intproductArity()java.lang.ObjectproductElement(int x$1)java.lang.StringproductElementName(int x$1)scala.collection.Iterator<java.lang.Object>productIterator()java.lang.StringproductPrefix()GSet<A>resetDelta()Reset collection of deltas from mutator operations.intsize()java.lang.StringtoString()static <A> scala.Option<scala.collection.immutable.Set<A>>unapply(GSet<A> x$0)GSet<A>zero()The empty full state.- 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface akka.cluster.ddata.DeltaReplicatedDatamergeDelta
 - 
Methods inherited from interface akka.cluster.ddata.FastMergeancestor_$eq, assignAncestor, clearAncestor, isAncestorOf
 - 
Methods inherited from interface akka.cluster.ddata.ReplicatedDatamerge
 
- 
 
- 
- 
- 
Method Detail- 
emptypublic static <A> GSet<A> empty() 
 - 
applypublic static GSet<java.lang.Object> apply() 
 - 
createpublic static <A> GSet<A> create() Java API
 - 
applypublic static <A> GSet<A> apply(scala.collection.immutable.Set<A> elements, scala.Option<GSet<A>> delta) 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. 
 - 
unapplypublic static <A> scala.Option<scala.collection.immutable.Set<A>> unapply(GSet<A> x$0) 
 - 
elementspublic scala.collection.immutable.Set<A> elements() 
 - 
deltapublic scala.Option<GSet<A>> delta() Description copied from interface:DeltaReplicatedDataThe accumulated delta of mutator operations since previousDeltaReplicatedData.resetDelta(). When theReplicatorinvokes themodifyfunction of theUpdatemessage and the user code is invoking one or more mutator operations the data is collecting the delta of the operations and makes it available for theReplicatorwith theDeltaReplicatedData.delta()accessor. Themodifyfunction shall still return the full state in the same way asReplicatedDatawithout support for deltas.- Specified by:
- deltain interface- DeltaReplicatedData
 
 - 
getElementspublic java.util.Set<A> getElements() Java API
 - 
containspublic boolean contains(A a) 
 - 
isEmptypublic boolean isEmpty() 
 - 
sizepublic int size() 
 - 
zeropublic GSet<A> zero() Description copied from interface:ReplicatedDeltaThe empty full state. This is used when a delta is received and no existing full state exists on the receiving side. Then the delta is merged into thezeroto create the initial full state.- Specified by:
- zeroin interface- ReplicatedDelta
 
 - 
resetDeltapublic GSet<A> resetDelta() Description copied from interface:DeltaReplicatedDataReset collection of deltas from mutator operations. When theReplicatorinvokes themodifyfunction of theUpdatemessage the delta is always "reset" and when the user code is invoking one or more mutator operations the data is collecting the delta of the operations and makes it available for theReplicatorwith theDeltaReplicatedData.delta()accessor. When theReplicatorhas grabbed thedeltait will invoke this method to get a clean data instance without the delta.- Specified by:
- resetDeltain interface- DeltaReplicatedData
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
productPrefixpublic java.lang.String productPrefix() - Specified by:
- productPrefixin interface- scala.Product
 
 - 
productAritypublic int productArity() - Specified by:
- productArityin interface- scala.Product
 
 - 
productElementpublic java.lang.Object productElement(int x$1) - Specified by:
- productElementin interface- scala.Product
 
 - 
productIteratorpublic scala.collection.Iterator<java.lang.Object> productIterator() - Specified by:
- productIteratorin interface- scala.Product
 
 - 
canEqualpublic boolean canEqual(java.lang.Object x$1) - Specified by:
- canEqualin interface- scala.Equals
 
 - 
productElementNamepublic java.lang.String productElementName(int x$1) - Specified by:
- productElementNamein interface- scala.Product
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object x$1) - Specified by:
- equalsin interface- scala.Equals
- Overrides:
- equalsin class- java.lang.Object
 
 
- 
 
-