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:
-
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 AbstractRequestFailureProxy<T,
C> externalizableProxy
(ABIVersion 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, 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
-