Skip to content
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.

Wip event deletion #8

Open
wants to merge 3 commits into
base: wip-rfc
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ sandbox.replication {
ask-timeout = 10s
retry-delay = 200ms
batch-size = 10
}

sandbox.log {
delete.retry-delay = 200ms
}
12 changes: 6 additions & 6 deletions src/main/scala/com/rbmhtechnology/eventuate/sandbox/Event.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.rbmhtechnology.eventuate.sandbox

case class EventMetadata(emitterId: String, emitterLogId: String, localLogId: String, localSequenceNr: Long, vectorTimestamp: VectorTime)
case class EventMetadata(emitterId: String, emitterLogId: String, localLogId: String, localSequenceNo: Long, vectorTimestamp: VectorTime)
case class PayloadVersion(majorVersion: Int, minorVersion: Int)
case class EventManifest(schema: String, isStringManifest: Boolean, payloadVersion: Option[PayloadVersion])
case class EventBytes(bytes: Array[Byte], serializerId: Int, manifest: EventManifest)
Expand All @@ -20,17 +20,17 @@ object DecodedEvent {
case class DecodedEvent(metadata: EventMetadata, payload: AnyRef) extends DurableEvent

case class EncodedEvent(metadata: EventMetadata, payload: EventBytes) extends DurableEvent {
def emitted(localLogId: String, localSequenceNr: Long): EncodedEvent = {
def emitted(localLogId: String, localSequenceNo: Long): EncodedEvent = {
copy(metadata.copy(
emitterLogId = localLogId,
localLogId = localLogId,
localSequenceNr = localSequenceNr,
vectorTimestamp = metadata.vectorTimestamp.setLocalTime(localLogId, localSequenceNr)))
localSequenceNo = localSequenceNo,
vectorTimestamp = metadata.vectorTimestamp.setLocalTime(localLogId, localSequenceNo)))
}

def replicated(localLogId: String, localSequenceNr: Long): EncodedEvent = {
def replicated(localLogId: String, localSequenceNo: Long): EncodedEvent = {
copy(metadata.copy(
localLogId = localLogId,
localSequenceNr = localSequenceNr))
localSequenceNo = localSequenceNo))
}
}
Loading