object BftSender
Utility class to make BFT-style operations.
- Alphabetic
- By Inheritance
- BftSender
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final case class FailedToReachThreshold[K, I, E](successes: Map[K, Set[I]], failures: Map[I, Either[Throwable, E]]) extends Product with Serializable
Returned when the request fails to reach the required threshold
Returned when the request fails to reach the required threshold
- K
type of the value hash
- I
type of the identity of operators
- E
error type of the operation performed
- successes
The operators that successfully performed the request, grouped by hash of the result
- failures
The operators that failed to perform the request
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 asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def makeRequest[I, E, O, A, K](description: String, futureSupervisor: FutureSupervisor, logger: TracedLogger, operators: Map[I, O], threshold: PositiveInt)(performRequest: (O) => EitherT[FutureUnlessShutdown, E, A])(resultHashKey: (A) => K)(implicit traceContext: TraceContext, executionContext: ExecutionContext): EitherT[FutureUnlessShutdown, FailedToReachThreshold[K, I, E], A]
Make a request to multiple operators and aggregate the responses such as the final result will be successful only if "threshold" responses were identical.
Make a request to multiple operators and aggregate the responses such as the final result will be successful only if "threshold" responses were identical. As soon as the threshold is reached, this method returns. It will also return with an error as soon as it is guaranteed that it cannot possibly gather sufficiently identical requests to meet the threshold.
- I
key of the operator, typically and ID
- E
Error type of performRequest
- O
operator type: object with which the performRequest function will be called
- A
type of the result
- K
type of the result hash
- description
description of the request
- operators
operators to use for the request. The request will be performed via every operator.
- threshold
minimum value of identical results that need to be received for the request to be successful (inclusive)
- performRequest
request to be performed.
- resultHashKey
function to provide a hash from a result. This is what determine whether 2 responses are identical.
- returns
The result of performRequest if sufficiently many responses were identical from the operators.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])