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 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 interface
RequestFailure.SerialForm<T extends WritableIdentifier,
C extends RequestFailure<T, C>> Externalizable proxy for use withRequestFailure
subclasses. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
RequestFailure
(@NonNull C failure, @NonNull ABIVersion version) protected
RequestFailure
(@NonNull T target, long sequence, @NonNull RequestException cause) -
Method Summary
Modifier and TypeMethodDescriptionprotected MoreObjects.ToStringHelper
addToStringAttributes
(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 RequestException
getCause()
Return the failure cause.final boolean
Return 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:Message
Add 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:
addToStringAttributes
in classMessage<T extends WritableIdentifier,
C extends RequestFailure<T, C>> - Parameters:
toStringHelper
- aMoreObjects.ToStringHelper
instance- Returns:
- The
MoreObjects.ToStringHelper
passed in as argument
-
externalizableProxy
Description copied from class:Message
Instantiate a serialization proxy for this object for the target ABI version. Implementations should return different objects for incompatibleABIVersion
s. This method should never fail, as any compatibility checks should have been done byMessage.cloneAsVersion(ABIVersion)
.- Specified by:
externalizableProxy
in classMessage<T extends WritableIdentifier,
C extends RequestFailure<T, C>> - Parameters:
version
- Requested ABI version- Returns:
- Proxy for this object
-