Packages

package log

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. final case class AttemptToAppendLogEntryAtEarlierTerm(attemptedEntry: LogCoords, latestLogEntryAppended: LogCoords) extends Exception with LogAppendResult with NoStackTrace with Product with Serializable
  2. final case class AttemptToSkipLogEntry(attemptedLogEntry: LogCoords, expectedNextIndex: LogIndex) extends Exception with LogAppendResult with NoStackTrace with Product with Serializable
  3. case class CachingLog[A](underlying: RaftLog[A]) extends DelegateLog[A] with Product with Serializable

    Wraps a log by keeping in memory the latest commit/append index

    Wraps a log by keeping in memory the latest commit/append index

    underlying

    the underlying log

  4. trait DelegateLog[A] extends RaftLog[A]
  5. trait FileBasedLog[T] extends RaftLog[T]
  6. class InMemory[T] extends BaseLog[T]

    An in-memory persistent log.

    An in-memory persistent log. Not a great idea for production, but nifty for testing

  7. sealed trait LogAppendResult extends AnyRef
  8. final case class LogAppendSuccess(firstIndex: LogCoords, lastIndex: LogCoords, replacedLogCoords: Seq[LogCoords] = Nil) extends LogAppendResult with Product with Serializable

    Represents the return type of a file-based raft log

    Represents the return type of a file-based raft log

    firstIndex

    the first index written

    lastIndex

    the last index written

    replacedLogCoords

    in the case where a disconnected leader had accepted commits, these are the coordinates of replaced entries which had been appended (but not committed) from an out-of-date leader

  9. final case class LogCoords(term: Term, index: LogIndex) extends Product with Serializable

    Represents the coords of a log entry

  10. final case class LogEntry[T](term: Term, data: T) extends Product with Serializable
  11. final case class LogState(commitIndex: LogIndex, latestTerm: Term, latestIndex: LogIndex) extends Product with Serializable
  12. final case class NotTheLeaderException(attemptedNodeId: NodeId, term: Term, leadIdOpt: Option[NodeId]) extends Exception with LogAppendResult with NoStackTrace with Product with Serializable
  13. trait RaftLog[A] extends RaftLogOps[A]

    The persistent log

  14. trait RaftLogOps[A] extends AnyRef

    A base type for the raft log.

    A base type for the raft log.

    the RaftLogOps#onCommit is the primary, important bit which binds the commit of the log entry to your application. That is the point where the entry is applied to your state-machine.

    The 'RaftLogOps' is declared from which RaftLog extends, as the JVM-specific implemenation uses the 'RaftLog' companion object with its dependency on the 'ToBytes'/'FromBytes' typeclasses, which as I write this, I realize how silly a reason that perhaps is to split it up.

    At any rate, the end-client consumers of this trait won't know, as both the JVM and Javascript variants expose a RaftLog, so it shouldn't really impact anybody, other than to give 'em pause as they think "why this extra step in the class hierarchy?"

    A

    the type stored in the log

  15. class StateMachineLog[A] extends DelegateLog[A]

    Invokes a function when log entries are committed

Value Members

  1. object FileBasedLog extends LowPriorityIOImplicits
  2. object LogAppendResult
  3. object LogCoords extends Serializable
  4. object LogState extends Serializable
  5. object RaftLog
  6. object StateMachineLog

Ungrouped