Class RequestFailure<T extends WritableIdentifier,C extends RequestFailure<T,C>>
java.lang.Object
org.opendaylight.controller.cluster.access.concepts.Message<T,C>
org.opendaylight.controller.cluster.access.concepts.Response<T,C>
org.opendaylight.controller.cluster.access.concepts.RequestFailure<T,C>
- Type Parameters:
T- Target identifier typeC- Message class
- All Implemented Interfaces:
Serializable,Immutable
- Direct Known Subclasses:
ConnectClientFailure,LocalHistoryFailure,TransactionFailure
@Beta
public abstract class RequestFailure<T extends WritableIdentifier,C extends RequestFailure<T,C>>
extends Response<T,C>
A failure response to a
Request. Contains a RequestException detailing the cause for this failure.- Author:
- Robert Varga
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRequestFailure(@NonNull C failure, @NonNull ABIVersion version) protectedRequestFailure(@NonNull T target, long sequence, @NonNull RequestException cause) -
Method Summary
Modifier and TypeMethodDescriptionprotected MoreObjects.ToStringHelperaddToStringAttributes(MoreObjects.ToStringHelper toStringHelper) Add attributes to the output ofMessage.toString().protected abstract AbstractRequestFailureProxy<T,C> externalizableProxy(ABIVersion version) final @NonNull RequestExceptiongetCause()Return the failure cause.final booleanReturn an indication of whether this a hard failure.Methods inherited from class org.opendaylight.controller.cluster.access.concepts.Message
cloneAsVersion, getSequence, getTarget, getVersion, toString, toVersion, writeReplace
-
Constructor Details
-
RequestFailure
-
RequestFailure
-
-
Method Details
-
getCause
Return the failure cause.- Returns:
- Failure cause.
-
isHardFailure
public final boolean isHardFailure()Return an indication of whether this a hard failure. Hard failures must not be retried but need to be treated as authoritative response to a request.- Returns:
- True if this represents a hard failure, false otherwise.
-
addToStringAttributes
protected MoreObjects.ToStringHelper addToStringAttributes(MoreObjects.ToStringHelper toStringHelper) Description copied from class:MessageAdd attributes to the output ofMessage.toString(). Subclasses wanting to contribute additional information should override this method. Any null attributes will be omitted from the output.- Overrides:
addToStringAttributesin classMessage<T extends WritableIdentifier,C extends RequestFailure<T, C>> - Parameters:
toStringHelper- aMoreObjects.ToStringHelperinstance- Returns:
- The
MoreObjects.ToStringHelperpassed in as argument
-
externalizableProxy
-