Package com.datastax.oss.driver.api.core
Class AllNodesFailedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.datastax.oss.driver.api.core.DriverException
-
- com.datastax.oss.driver.api.core.AllNodesFailedException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
NoNodeAvailableException
public class AllNodesFailedException extends DriverException
Thrown when a query failed on all the coordinators it was tried on. This exception may wrap multiple errors, that are available either as suppressed exceptions, or viagetAllErrors()where they are grouped by node.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAllNodesFailedException(String message, ExecutionInfo executionInfo, Iterable<Map.Entry<Node,List<Throwable>>> errors)protectedAllNodesFailedException(String message, ExecutionInfo executionInfo, Map<Node,Throwable> errors)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description DriverExceptioncopy()Copy the exception.static AllNodesFailedExceptionfromErrors(List<Map.Entry<Node,Throwable>> errors)static AllNodesFailedExceptionfromErrors(Map<Node,Throwable> errors)Deprecated.UsefromErrors(List)instead.Map<Node,List<Throwable>>getAllErrors()An immutable map containing all errors on each tried node.Map<Node,Throwable>getErrors()Deprecated.UsegetAllErrors()instead.AllNodesFailedExceptionreword(String newMessage)-
Methods inherited from class com.datastax.oss.driver.api.core.DriverException
getExecutionInfo, setExecutionInfo
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
AllNodesFailedException
@Deprecated protected AllNodesFailedException(@NonNull String message, @Nullable ExecutionInfo executionInfo, @NonNull Map<Node,Throwable> errors)
Deprecated.
-
-
Method Detail
-
fromErrors
@NonNull @Deprecated public static AllNodesFailedException fromErrors(@Nullable Map<Node,Throwable> errors)
Deprecated.UsefromErrors(List)instead.
-
fromErrors
@NonNull public static AllNodesFailedException fromErrors(@Nullable List<Map.Entry<Node,Throwable>> errors)
-
getErrors
@NonNull @Deprecated public Map<Node,Throwable> getErrors()
Deprecated.UsegetAllErrors()instead.An immutable map containing the first error on each tried node.
-
getAllErrors
@NonNull public Map<Node,List<Throwable>> getAllErrors()
An immutable map containing all errors on each tried node.
-
copy
@NonNull public DriverException copy()
Description copied from class:DriverExceptionCopy the exception.This returns a new exception, equivalent to the original one, except that because a new object is created in the current thread, the top-most element in the stacktrace of the exception will refer to the current thread. The original exception may or may not be included as the copy's cause, depending on whether that is deemed useful (this is left to the discretion of each implementation).
This is intended for the synchronous wrapper methods of the driver, in order to produce a more user-friendly stack trace (that includes the line in the user code where the driver rethrew the error).
- Specified by:
copyin classDriverException
-
reword
@NonNull public AllNodesFailedException reword(String newMessage)
-
-