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
public abstract non-sealed 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.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceRequestFailure.SerialForm<T extends WritableIdentifier,C extends RequestFailure<T, C>> Externalizable proxy for use withRequestFailuresubclasses. -
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 RequestFailure.SerialForm<T, C> externalizableProxy(ABIVersion version) Instantiate a serialization proxy for this object for the target ABI 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, throwNSE, 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
Description copied from class:MessageInstantiate a serialization proxy for this object for the target ABI version. Implementations should return different objects for incompatibleABIVersions. This method should never fail, as any compatibility checks should have been done byMessage.cloneAsVersion(ABIVersion).- Specified by:
externalizableProxyin classMessage<T extends WritableIdentifier,C extends RequestFailure<T, C>> - Parameters:
version- Requested ABI version- Returns:
- Proxy for this object
-