case class ObservableLog[A](underlying: RaftLog[A])(implicit scheduler: Scheduler) extends DelegateLog[A] with CommittedOps[A] with AppendOps[A] with Product with Serializable
Wraps a riff.raft.log.RaftLog for a local node which exposes Observable data publishers for: $ Appended LogCoords $ Appended LogEntry $ Appended LogCoords from a historic index $ Appended LogEntry from a historic index $ Committed LogCoords $ Committed LogEntry $ Committed LogCoords from a historic index $ Committed LogEntry from a historic index
- underlying
the wrapped log
- scheduler
the scheduler to use for the observables
- Alphabetic
- By Inheritance
- ObservableLog
- Serializable
- Serializable
- Product
- Equals
- AppendOps
- CommittedOps
- DelegateLog
- RaftLog
- RaftLogOps
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ObservableLog(underlying: RaftLog[A])(implicit scheduler: Scheduler)
- underlying
the wrapped log
- scheduler
the scheduler to use for the observables
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
append(coords: LogCoords, data: A, theRest: A*)(implicit classTag: ClassTag[A]): LogAppendResult
- Definition Classes
- RaftLogOps
-
def
appendAll(fromIndex: LogIndex, data: Array[LogEntry[A]]): LogAppendResult
- Definition Classes
- ObservableLog → DelegateLog → RaftLogOps
-
def
appendCoords(): Observable[LogCoords]
- returns
an observable of the appended BUT NOT YET committed entries from the time of subscription
- Definition Classes
- AppendOps
-
def
appendResults(): Observable[LogAppendResult]
- returns
an observable of the appended BUT NOT YET committed entries
- Definition Classes
- ObservableLog → AppendOps
-
def
appendedCoordsFrom(index: LogIndex): Observable[LogCoords]
- index
the (one based!) index from which we'd like to read the appended coords
- returns
an observable of all appended (not necessarily committed) entries from the given index
- Definition Classes
- ObservableLog → AppendOps
-
def
appendedEntries(): Observable[(LogCoords, A)]
- returns
an observable of the appended coordinates and data from the time of subscription
- Definition Classes
- AppendOps
-
def
appendedEntriesFrom(index: LogIndex): Observable[(LogCoords, A)]
- returns
an observable of log entries from the given index
- Definition Classes
- AppendOps
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
cached(): CachingLog[A]
- Definition Classes
- RaftLogOps
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
commit(index: LogIndex): Seq[LogCoords]
- Definition Classes
- ObservableLog → DelegateLog → RaftLogOps
-
def
committedCoords(): Observable[LogCoords]
- returns
an observable of committed coordinates from the point of subscription
- Definition Classes
- ObservableLog → CommittedOps
-
def
committedCoordsFrom(index: LogIndex): Observable[LogCoords]
- index
the (one based!) index from which we'd like to read the committed coords
- returns
an observable of all committed entries from the given index
- Definition Classes
- ObservableLog → CommittedOps
-
def
committedEntries(): Observable[(LogCoords, A)]
- returns
an Observable of the committed coords and their values from the moment of subscription
- Definition Classes
- CommittedOps
-
def
committedEntriesFrom(index: LogIndex): Observable[(LogCoords, A)]
- index
the (one based!) index from which to observe
- returns
an observable of the log entries from a particular index
- Definition Classes
- CommittedOps
-
def
contains(entry: LogCoords): Boolean
- Definition Classes
- RaftLogOps
-
def
containsIndex(index: LogCoords): Boolean
- Attributes
- protected
- Definition Classes
- RaftLogOps
-
final
def
coordsForIndex(index: LogIndex): Option[LogCoords]
- Definition Classes
- RaftLogOps
-
def
dataForIndex(coords: LogCoords): Observable[(LogCoords, A)]
- Attributes
- protected
- Definition Classes
- ObservableLog → AppendOps → CommittedOps
-
def
entriesFrom(firstIndex: LogIndex, max: Int): Array[LogEntry[A]]
- Definition Classes
- RaftLogOps
-
def
entryForIndex(index: LogIndex): Option[LogEntry[A]]
- Definition Classes
- DelegateLog → RaftLogOps
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
latestAppended(): LogCoords
- Definition Classes
- DelegateLog → RaftLogOps
-
def
latestAppendedIndex(): LogIndex
- returns
the append index from the most recent append or 1 if the last append was in error or not yet received
-
def
latestCommit(): LogIndex
- Definition Classes
- DelegateLog → RaftLogOps
- def latestCommittedIndex(): LogIndex
-
def
logState(): LogState
- Definition Classes
- RaftLogOps
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
onAppend(currentTerm: Term, request: AppendEntries[A]): AppendEntriesResponse
- Definition Classes
- RaftLogOps
-
def
onCommit(applyToStateMachine: (LogEntry[A]) ⇒ Unit): StateMachineLog[A]
- Definition Classes
- RaftLogOps
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
termForIndex(index: LogIndex): Option[Term]
- Definition Classes
- DelegateLog → RaftLogOps
-
val
underlying: RaftLog[A]
- Definition Classes
- ObservableLog → DelegateLog
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )