Class RaftCallback<T>
java.lang.Object
org.opendaylight.controller.cluster.raft.spi.RaftCallback<T>
- Type Parameters:
T- type of successful result
- Direct Known Subclasses:
DecoratingRaftCallback
A simple callback interface. Guaranteed to be invoked in
RaftActor confinement.- API Note:
- We choose an abstract class over a functional interface so we can force a
toString()implementation friendly to logging -- quite the opposite of what lambdas would do.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract MoreObjects.ToStringHelperEnrich aMoreObjects.ToStringHelperwith class-specific attributes.abstract voidInvoke the callback.final StringtoString()
-
Constructor Details
-
RaftCallback
public RaftCallback()
-
-
Method Details
-
invoke
Invoke the callback.- Parameters:
failure- failure cause,nullif successfulsuccess- successful result, only valid iffailure == null
-
addToStringAttributes
@NonNullByDefault protected abstract MoreObjects.ToStringHelper addToStringAttributes(MoreObjects.ToStringHelper helper) Enrich aMoreObjects.ToStringHelperwith class-specific attributes.- Parameters:
helper- the helper- Returns:
- the helper
-
toString
-