Trait

com.rbmhtechnology.eventuate.crdt.pure

CvRDTPureOpSimple

Related Doc: package pure

Permalink

trait CvRDTPureOpSimple[B] extends CvRDTPureOp[Seq[Operation], B]

A base trait for pure-op based CRDTs wich state is a sequence of stable operations

B

CRDT value type

Linear Supertypes
CvRDTPureOp[Seq[Operation], B], CRDTServiceOps[CRDT[Seq[Operation]], B], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CvRDTPureOpSimple
  2. CvRDTPureOp
  3. CRDTServiceOps
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. implicit abstract def causalRedundancy: CausalRedundancy

    Permalink

    The data-type specific relations r,r0 and r1 used for reducing the POLog size via causal redundancy

    The data-type specific relations r,r0 and r1 used for reducing the POLog size via causal redundancy

    Definition Classes
    CvRDTPureOp
  2. abstract def customEval(ops: Seq[Versioned[Operation]]): B

    Permalink

    Data-type specific eval over the full Seq of timestamped operations.

    Data-type specific eval over the full Seq of timestamped operations. Note that the Seq contains both the non-stable operation from the POLog and the stable operations (timestamped with VectorTime.Zero) from the state.

    ops

    the full sequence of ops, stable (with the VectorTime.Zero) and non-stable

    returns

    the value of the crdt

    Attributes
    protected

Concrete 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. final def effect(crdt: CRDT[Seq[Operation]], op: Operation, vt: VectorTime, systemTimestamp: Long = 0L, creator: String = ""): CRDT[Seq[Operation]]

    Permalink

    Adds the operation to the POLog using the causal redundancy relations and also updates the state with the newly delivered operation.

    Adds the operation to the POLog using the causal redundancy relations and also updates the state with the newly delivered operation.

    op

    newly delivered operation

    vt

    operation's timestamp

    systemTimestamp

    operation's metadata

    creator

    operation's metadata

    returns

    a copy of the CRDT with its POLog and state updated

    Definition Classes
    CvRDTPureOpCRDTServiceOps
  7. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  9. final def eval(crdt: SimpleCRDT): B

    Permalink

    To simplify the eval method, it asociates the VectorTime.Zero to each stable operation and calls customEval over the full sequence of operations, the ones from the POLog and the ones from the state.

    To simplify the eval method, it asociates the VectorTime.Zero to each stable operation and calls customEval over the full sequence of operations, the ones from the POLog and the ones from the state. Note: this has to be a sequence instead of a Set because now the VectorTime is not unique

    Definition Classes
    CvRDTPureOpSimpleCRDTServiceOps
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  17. def optimizedUpdateState: PartialFunction[(Operation, Seq[Operation]), Seq[Operation]]

    Permalink

    Allows to define a custom implementation with improved performance to update the state.

    Allows to define a custom implementation with improved performance to update the state. e.g. The AWCart implementation returns an empty state if the newly delivered operation is a ClearOp

    returns

    the updated state

  18. def precondition: Boolean

    Permalink

    A pure-op based doesn't need to check preconditions because the framework just returns the unmodified operation on prepare

    A pure-op based doesn't need to check preconditions because the framework just returns the unmodified operation on prepare

    Definition Classes
    CvRDTPureOpCRDTServiceOps
  19. def prepare(crdt: CRDT[Seq[Operation]], operation: Operation): Try[Option[Operation]]

    Permalink

    Update phase 1 ("atSource").

    Update phase 1 ("atSource"). Prepares an operation for phase 2.

    Definition Classes
    CRDTServiceOps
  20. def stabilize(polog: POLog, stable: TCStable): POLog

    Permalink

    "This function takes a stable timestamp t (fed by the TCSB middleware) and the full PO-Log s as input, and returns a new PO-Log (i.e., a map), possibly discarding a set of operations at once."

    "This function takes a stable timestamp t (fed by the TCSB middleware) and the full PO-Log s as input, and returns a new PO-Log (i.e., a map), possibly discarding a set of operations at once."

    Attributes
    protected
    Definition Classes
    CvRDTPureOp
  21. def stabilizeState(state: Seq[Operation], stableOps: Seq[Operation]): Seq[Operation]

    Permalink

    Adds the stable operations to the state of the CRDT

    Adds the stable operations to the state of the CRDT

    state

    the current state of the CRDT

    stableOps

    the causaly stable operations

    returns

    the updated state

    Attributes
    protected
    Definition Classes
    CvRDTPureOpSimpleCvRDTPureOp
  22. def stable(crdt: CRDT[Seq[Operation]], tcstable: TCStable): CRDT[Seq[Operation]]

    Permalink

    "The stable handler, on the other hand, invokes stabilize and then strips the timestamp (if the operation has not been discarded by stabilize), by replacing a (t', o') pair that is present in the returned PO-Log by (⊥, o')" The actual implementation doesn't replace the timestamp with ⊥, instead it calls stabilizeState with the current CRDT.state and the sequence of stable operations discarded from the POLog.

    "The stable handler, on the other hand, invokes stabilize and then strips the timestamp (if the operation has not been discarded by stabilize), by replacing a (t', o') pair that is present in the returned PO-Log by (⊥, o')" The actual implementation doesn't replace the timestamp with ⊥, instead it calls stabilizeState with the current CRDT.state and the sequence of stable operations discarded from the POLog.

    crdt

    a crdt

    tcstable

    a stable VectorTime fed by the middleware

    returns

    a possible optimized crdt after discarding operations and removing timestamps

    Definition Classes
    CvRDTPureOpCRDTServiceOps
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def updateState(op: Operation, redundant: Boolean, state: Seq[Operation]): Seq[Operation]

    Permalink

    By default it uses CausalRedundancy.r0 (if the op was redundant and hence not added to the POLog) or CausalRedundancy.r1 (it the op was added to the POLog) to update the state, unless the ops contains an implementation of optimizedUpdateState

    By default it uses CausalRedundancy.r0 (if the op was redundant and hence not added to the POLog) or CausalRedundancy.r1 (it the op was added to the POLog) to update the state, unless the ops contains an implementation of optimizedUpdateState

    op

    the newly delivered operation

    redundant

    a flag indicating if the newly delivered operation was redundant or it was added to the POLog.

    state

    the current CRDT state

    returns

    the updated state

    Attributes
    protected
    Definition Classes
    CvRDTPureOpSimpleCvRDTPureOp
  26. final def value(crdt: CRDT[Seq[Operation]]): B

    Permalink

    Returns the CRDT value (for example, the entries of an OR-Set)

    Returns the CRDT value (for example, the entries of an OR-Set)

    Definition Classes
    CRDTServiceOps
  27. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def zero: SimpleCRDT

    Permalink

    Default CRDT instance.

    Default CRDT instance.

    Definition Classes
    CvRDTPureOpSimpleCRDTServiceOps

Inherited from CvRDTPureOp[Seq[Operation], B]

Inherited from CRDTServiceOps[CRDT[Seq[Operation]], B]

Inherited from AnyRef

Inherited from Any

Ungrouped