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,MutationBehaviour<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 aRequest. Contains aRequestExceptiondetailing the cause for this failure.- Author:
- Robert Varga
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRequestFailure(@NonNull C failure, @NonNull ABIVersion version)protectedRequestFailure(@NonNull T target, long sequence, @NonNull RequestException cause)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected MoreObjects.ToStringHelperaddToStringAttributes(MoreObjects.ToStringHelper toStringHelper)Add attributes to the output ofMessage.toString().protected abstract AbstractRequestFailureProxy<T,C>externalizableProxy(ABIVersion version)@NonNull RequestExceptiongetCause()Return the failure cause.booleanisHardFailure()Return 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 Detail
-
RequestFailure
protected RequestFailure(@NonNull C failure, @NonNull ABIVersion version)
-
RequestFailure
protected RequestFailure(@NonNull T target, long sequence, @NonNull RequestException cause)
-
-
Method Detail
-
getCause
public final @NonNull RequestException 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
protected abstract AbstractRequestFailureProxy<T,C> externalizableProxy(ABIVersion version)
-
-