trait RaftClient[F[_], A] extends AnyRef
The external use-cases for a node in the Raft protocol are:
1) adding/removing nodes 2) appending data to the cluster, which should return either a new (pending) commit coords, a redirect, or a 'no known leader' 3) subscribing to lifecycle events, which should return a Publisher which lets subscribers know about cluster and leadership changes 4) subscribing to a commit log, which should return a Publisher which lets subscribers know when logs are appended or committed
All of these algebras don't necessarily have to be in the same trait
- Alphabetic
- By Inheritance
- RaftClient
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
append(data: Array[A]): F[AppendStatus]
This is a client's view of a raft cluster, which simply wants to write some data.
This is a client's view of a raft cluster, which simply wants to write some data.
It should return some kind of observable result F[AppendStatus] which can represent an updated status as each member of the cluster replies to the append. F[AppendStatus] should also be able to represent a failure if the node represented by this client is not the leader or otherwise can't support the append.
This call may also trigger a AppendOccurredOnDisconnectedLeader if the append occurs on a leader which can't replicate the data and is subsequently replaced by another leader in another election.
- data
the data to write
- returns
an observable of the append results as they are appended/co
Concrete 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
-
final
def
append(data: A, theRest: A*)(implicit classTag: ClassTag[A]): F[AppendStatus]
Convenience method for appending a var-arg set of data
Convenience method for appending a var-arg set of data
- data
the first element to append
- theRest
the remaining elements
- returns
an F[AppendStatus] representing the append results
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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( ... )