Package org.apache.hadoop.hbase.util
Class ExceptionUtil
java.lang.Object
org.apache.hadoop.hbase.util.ExceptionUtil
This class handles the different interruption classes. It can be: - InterruptedException -
InterruptedIOException (inherits IOException); used in IO - ClosedByInterruptException (inherits
IOException) - SocketTimeoutException inherits InterruptedIOException but is not a real
interruption, so we have to distinguish the case. This pattern is unfortunately common.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic InterruptedIOException
Returns an InterruptedIOException if t was an interruption, null otherwisestatic boolean
Returns true if the throwable comes an interruption, false otherwise.static void
Throw InterruptedIOException if t was an interruption, nothing otherwise.
-
Constructor Details
-
ExceptionUtil
private ExceptionUtil()
-
-
Method Details
-
isInterrupt
Returns true if the throwable comes an interruption, false otherwise. -
rethrowIfInterrupt
Throw InterruptedIOException if t was an interruption, nothing otherwise.- Throws:
InterruptedIOException
-
asInterrupt
Returns an InterruptedIOException if t was an interruption, null otherwise
-