package crdt

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. trait Crdt extends AnyRef

    CRDT Protocol Note that while this protocol provides support for CRDTs, the data types sent across the protocol are not CRDTs themselves.

    CRDT Protocol Note that while this protocol provides support for CRDTs, the data types sent across the protocol are not CRDTs themselves. It is the responsibility of the CloudState proxy to implement the CRDTs, merge functions, vector clocks etc, not the user function. The user function need only hold the current value in memory, and this protocol sends deltas to the user function to update its in memory value as necessary. These deltas have no way of dealing with conflicts, hence it important that the CloudState proxy always know what the state of the user functions in memory value is before sending a delta. If the CloudState proxy is not sure what the value is, eg because it has just sent an operation to the user function may have updated its value as a result, the proxy should wait until it gets the result of the operation back, to ensure its in memory value is in sync with the user function so that it can calculate deltas that won't conflict. The user function is expected to update its value both as the result of receiving deltas from the proxy, as well as when it sends deltas. It must not update its value in any other circumstance, updating the value in response to any other stimuli risks the value becoming out of sync with the CloudState proxy. The user function will not be sent back deltas as a result of its own changes. An invocation of handle is made for each entity being handled. It may be kept alive and used to handle multiple commands, and may subsequently be terminated if that entity becomes idle, or if the entity is deleted. Shutdown is typically done for efficiency reasons, unless the entity is explicitly deleted, a terminated handle stream does not mean the proxy has stopped tracking the state of the entity in its memory. Special care must be taken when working with maps and sets. The keys/values are google.protobuf.Any, which encodes the value as binary protobuf, however, serialized protobufs are not stable, two semantically equal objects could encode to different bytes. It is the responsibility of the user function to ensure that stable encodings are used.

  2. sealed trait CrdtClock extends GeneratedEnum
  3. final case class CrdtDelete() extends GeneratedMessage with Message[CrdtDelete] with Updatable[CrdtDelete] with Product with Serializable
    Annotations
    @SerialVersionUID()
  4. final case class CrdtDelta(delta: Delta = ...) extends GeneratedMessage with Message[CrdtDelta] with Updatable[CrdtDelta] with Product with Serializable

    A CRDT delta

    A CRDT delta

    Deltas only carry the change in value, not the full value (unless

    Annotations
    @SerialVersionUID()
  5. final case class CrdtInit(serviceName: String = "", entityId: String = "", state: Option[CrdtState] = _root_.scala.None) extends GeneratedMessage with Message[CrdtInit] with Updatable[CrdtInit] with Product with Serializable
    Annotations
    @SerialVersionUID()
  6. final case class CrdtReply(commandId: Long = 0L, clientAction: Option[ClientAction] = _root_.scala.None, sideEffects: Seq[SideEffect] = _root_.scala.Seq.empty, stateAction: Option[CrdtStateAction] = _root_.scala.None, streamed: Boolean = false) extends GeneratedMessage with Message[CrdtReply] with Updatable[CrdtReply] with Product with Serializable

    streamed

    If the request was streamed, setting this to true indicates that the command should be handled as a stream. Subsequently, the user function may send CrdtStreamedMessage, and a CrdtStreamCancelled message will be sent if the stream is cancelled (though not if the a CrdtStreamedMessage ends the stream first).

    Annotations
    @SerialVersionUID()
  7. final case class CrdtState(state: State = ...) extends GeneratedMessage with Message[CrdtState] with Updatable[CrdtState] with Product with Serializable

    The CRDT state.

    The CRDT state. This represents the full state of a CRDT. When received, a user function should replace the current state with this, not apply it as a delta. This includes both for the top level CRDT, and embedded CRDTs, such as the values of an ORMap.

    Annotations
    @SerialVersionUID()
  8. final case class CrdtStateAction(writeConsistency: CrdtWriteConsistency = ..., action: Action = ...) extends GeneratedMessage with Message[CrdtStateAction] with Updatable[CrdtStateAction] with Product with Serializable
    Annotations
    @SerialVersionUID()
  9. final case class CrdtStreamCancelledResponse(commandId: Long = 0L, sideEffects: Seq[SideEffect] = _root_.scala.Seq.empty, stateAction: Option[CrdtStateAction] = _root_.scala.None) extends GeneratedMessage with Message[CrdtStreamCancelledResponse] with Updatable[CrdtStreamCancelledResponse] with Product with Serializable
    Annotations
    @SerialVersionUID()
  10. final case class CrdtStreamIn(message: Message = ...) extends GeneratedMessage with Message[CrdtStreamIn] with Updatable[CrdtStreamIn] with Product with Serializable

    Message for the Crdt handle stream in.

    Message for the Crdt handle stream in.

    Annotations
    @SerialVersionUID()
  11. final case class CrdtStreamOut(message: Message = ...) extends GeneratedMessage with Message[CrdtStreamOut] with Updatable[CrdtStreamOut] with Product with Serializable

    Message for the Crdt handle stream out.

    Message for the Crdt handle stream out.

    Annotations
    @SerialVersionUID()
  12. final case class CrdtStreamedMessage(commandId: Long = 0L, clientAction: Option[ClientAction] = _root_.scala.None, sideEffects: Seq[SideEffect] = _root_.scala.Seq.empty, endStream: Boolean = false) extends GeneratedMessage with Message[CrdtStreamedMessage] with Updatable[CrdtStreamedMessage] with Product with Serializable

    May be sent as often as liked if the first reply set streamed to true

    May be sent as often as liked if the first reply set streamed to true

    endStream

    Indicates the stream should end, no messages may be sent for this command after this.

    Annotations
    @SerialVersionUID()
  13. sealed trait CrdtWriteConsistency extends GeneratedEnum
  14. final case class FlagDelta(value: Boolean = false) extends GeneratedMessage with Message[FlagDelta] with Updatable[FlagDelta] with Product with Serializable
    Annotations
    @SerialVersionUID()
  15. final case class FlagState(value: Boolean = false) extends GeneratedMessage with Message[FlagState] with Updatable[FlagState] with Product with Serializable

    A Flag

    A Flag

    A Flag is a boolean value, that once set to true, stays true.

    value

    The current value of the flag.

    Annotations
    @SerialVersionUID()
  16. final case class GCounterDelta(increment: Long = 0L) extends GeneratedMessage with Message[GCounterDelta] with Updatable[GCounterDelta] with Product with Serializable
    Annotations
    @SerialVersionUID()
  17. final case class GCounterState(value: Long = 0L) extends GeneratedMessage with Message[GCounterState] with Updatable[GCounterState] with Product with Serializable

    A Grow-only counter

    A Grow-only counter

    A G-Counter can only be incremented, it can't be decremented.

    value

    The current value of the counter.

    Annotations
    @SerialVersionUID()
  18. final case class GSetDelta(added: Seq[Any] = _root_.scala.Seq.empty) extends GeneratedMessage with Message[GSetDelta] with Updatable[GSetDelta] with Product with Serializable
    Annotations
    @SerialVersionUID()
  19. final case class GSetState(items: Seq[Any] = _root_.scala.Seq.empty) extends GeneratedMessage with Message[GSetState] with Updatable[GSetState] with Product with Serializable

    A Grow-only Set

    A Grow-only Set

    A G-Set can only have items added, items cannot be removed.

    items

    The current items in the set.

    Annotations
    @SerialVersionUID()
  20. final case class LWWRegisterDelta(value: Option[Any] = _root_.scala.None, clock: CrdtClock = ..., customClockValue: Long = 0L) extends GeneratedMessage with Message[LWWRegisterDelta] with Updatable[LWWRegisterDelta] with Product with Serializable
    Annotations
    @SerialVersionUID()
  21. final case class LWWRegisterState(value: Option[Any] = _root_.scala.None, clock: CrdtClock = ..., customClockValue: Long = 0L) extends GeneratedMessage with Message[LWWRegisterState] with Updatable[LWWRegisterState] with Product with Serializable

    A Last-Write-Wins Register

    A Last-Write-Wins Register

    A LWW-Register holds a single value, with the current value being selected based on when it was last written. The time of the last write may either be determined using the proxies clock, or may be based on a custom, domain specific value.

    value

    The current value of the register.

    clock

    The clock to use if this state needs to be merged with another one.

    customClockValue

    The clock value if the clock in use is a custom clock.

    Annotations
    @SerialVersionUID()
  22. final case class ORMapDelta(cleared: Boolean = false, removed: Seq[Any] = _root_.scala.Seq.empty, updated: Seq[ORMapEntryDelta] = _root_.scala.Seq.empty, added: Seq[ORMapEntry] = _root_.scala.Seq.empty) extends GeneratedMessage with Message[ORMapDelta] with Updatable[ORMapDelta] with Product with Serializable
    Annotations
    @SerialVersionUID()
  23. final case class ORMapEntry(key: Option[Any] = _root_.scala.None, value: Option[CrdtState] = _root_.scala.None) extends GeneratedMessage with Message[ORMapEntry] with Updatable[ORMapEntry] with Product with Serializable

    An OR-Map entry.

    An OR-Map entry.

    key

    The entry key.

    value

    The value of the entry, a CRDT itself.

    Annotations
    @SerialVersionUID()
  24. final case class ORMapEntryDelta(key: Option[Any] = _root_.scala.None, delta: Option[CrdtDelta] = _root_.scala.None) extends GeneratedMessage with Message[ORMapEntryDelta] with Updatable[ORMapEntryDelta] with Product with Serializable

    key

    The entry key.

    Annotations
    @SerialVersionUID()
  25. final case class ORMapState(entries: Seq[ORMapEntry] = _root_.scala.Seq.empty) extends GeneratedMessage with Message[ORMapState] with Updatable[ORMapState] with Product with Serializable

    An Observed-Removed Map

    An Observed-Removed Map

    Like an OR-Set, an OR-Map may have items added and removed, with the condition that an item must be observed to be in the map before it is removed. The values of the map are CRDTs themselves. Different keys are allowed to use different CRDTs, and if an item is removed, and then replaced, the new value may be a different CRDT.

    entries

    The entries of the map.

    Annotations
    @SerialVersionUID()
  26. final case class ORSetDelta(cleared: Boolean = false, removed: Seq[Any] = _root_.scala.Seq.empty, added: Seq[Any] = _root_.scala.Seq.empty) extends GeneratedMessage with Message[ORSetDelta] with Updatable[ORSetDelta] with Product with Serializable

    cleared

    If cleared is set, the set must be cleared before added is processed.

    Annotations
    @SerialVersionUID()
  27. final case class ORSetState(items: Seq[Any] = _root_.scala.Seq.empty) extends GeneratedMessage with Message[ORSetState] with Updatable[ORSetState] with Product with Serializable

    An Observed-Removed Set

    An Observed-Removed Set

    An OR-Set may have items added and removed, with the condition that an item must be observed to be in the set before it is removed.

    items

    The current items in the set.

    Annotations
    @SerialVersionUID()
  28. final case class PNCounterDelta(change: Long = 0L) extends GeneratedMessage with Message[PNCounterDelta] with Updatable[PNCounterDelta] with Product with Serializable
    Annotations
    @SerialVersionUID()
  29. final case class PNCounterState(value: Long = 0L) extends GeneratedMessage with Message[PNCounterState] with Updatable[PNCounterState] with Product with Serializable

    A Positve-Negative Counter

    A Positve-Negative Counter

    A PN-Counter can be both incremented and decremented.

    value

    The current value of the counter.

    Annotations
    @SerialVersionUID()
  30. final case class VoteDelta(selfVote: Boolean = false, votesFor: Int = 0, totalVoters: Int = 0) extends GeneratedMessage with Message[VoteDelta] with Updatable[VoteDelta] with Product with Serializable

    selfVote

    Only set by the user function to change the nodes current vote.

    votesFor

    Only set by the proxy to change the votes for and total voters.

    Annotations
    @SerialVersionUID()
  31. final case class VoteState(votesFor: Int = 0, totalVoters: Int = 0, selfVote: Boolean = false) extends GeneratedMessage with Message[VoteState] with Updatable[VoteState] with Product with Serializable

    A Vote.

    A Vote. This allows nodes to vote on something.

    votesFor

    The number of votes for

    totalVoters

    The total number of voters

    selfVote

    The vote of the current node, which is included in the above two numbers

    Annotations
    @SerialVersionUID()

Value Members

  1. object Crdt
  2. object CrdtClock extends GeneratedEnumCompanion[CrdtClock] with Serializable
  3. object CrdtDelete extends GeneratedMessageCompanion[CrdtDelete] with Serializable
  4. object CrdtDelta extends GeneratedMessageCompanion[CrdtDelta] with Serializable
  5. object CrdtHandler
  6. object CrdtInit extends GeneratedMessageCompanion[CrdtInit] with Serializable
  7. object CrdtProto extends GeneratedFileObject
  8. object CrdtReply extends GeneratedMessageCompanion[CrdtReply] with Serializable
  9. object CrdtState extends GeneratedMessageCompanion[CrdtState] with Serializable
  10. object CrdtStateAction extends GeneratedMessageCompanion[CrdtStateAction] with Serializable
  11. object CrdtStreamCancelledResponse extends GeneratedMessageCompanion[CrdtStreamCancelledResponse] with Serializable
  12. object CrdtStreamIn extends GeneratedMessageCompanion[CrdtStreamIn] with Serializable
  13. object CrdtStreamOut extends GeneratedMessageCompanion[CrdtStreamOut] with Serializable
  14. object CrdtStreamedMessage extends GeneratedMessageCompanion[CrdtStreamedMessage] with Serializable
  15. object CrdtWriteConsistency extends GeneratedEnumCompanion[CrdtWriteConsistency] with Serializable
  16. object FlagDelta extends GeneratedMessageCompanion[FlagDelta] with Serializable
  17. object FlagState extends GeneratedMessageCompanion[FlagState] with Serializable
  18. object GCounterDelta extends GeneratedMessageCompanion[GCounterDelta] with Serializable
  19. object GCounterState extends GeneratedMessageCompanion[GCounterState] with Serializable
  20. object GSetDelta extends GeneratedMessageCompanion[GSetDelta] with Serializable
  21. object GSetState extends GeneratedMessageCompanion[GSetState] with Serializable
  22. object LWWRegisterDelta extends GeneratedMessageCompanion[LWWRegisterDelta] with Serializable
  23. object LWWRegisterState extends GeneratedMessageCompanion[LWWRegisterState] with Serializable
  24. object ORMapDelta extends GeneratedMessageCompanion[ORMapDelta] with Serializable
  25. object ORMapEntry extends GeneratedMessageCompanion[ORMapEntry] with Serializable
  26. object ORMapEntryDelta extends GeneratedMessageCompanion[ORMapEntryDelta] with Serializable
  27. object ORMapState extends GeneratedMessageCompanion[ORMapState] with Serializable
  28. object ORSetDelta extends GeneratedMessageCompanion[ORSetDelta] with Serializable
  29. object ORSetState extends GeneratedMessageCompanion[ORSetState] with Serializable
  30. object PNCounterDelta extends GeneratedMessageCompanion[PNCounterDelta] with Serializable
  31. object PNCounterState extends GeneratedMessageCompanion[PNCounterState] with Serializable
  32. object VoteDelta extends GeneratedMessageCompanion[VoteDelta] with Serializable
  33. object VoteState extends GeneratedMessageCompanion[VoteState] with Serializable

Ungrouped