|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.jini.constants.ThrowableConstants
public class ThrowableConstants
Various constants useful in processing exceptions
Field Summary | |
---|---|
static int |
BAD_INVOCATION
Value returned by retryable to indicate that the
passed Throwable implies that retrying the
operation that threw the Throwable with the same
arguments and the same expected return value would not be
fruitful. |
static int |
BAD_OBJECT
Value returned by retryable to indicate that the
passed Throwable implies that any further
operations on the object that threw the Throwable
would not be fruitful. |
static int |
INDEFINITE
Value returned by retryable to indicate that the
passed Throwable does not provide any new
information on the state of the object that threw it. |
static int |
UNCATEGORIZED
Value returned by retryable to indicate that the
passed Throwable was of a type that could not be
classified. |
Constructor Summary | |
---|---|
ThrowableConstants()
|
Method Summary | |
---|---|
static int |
retryable(Throwable t)
Attempt to classify the passed Throwable in terms of
what it implies about the probability of success of future operations
on the object that threw the exception. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int INDEFINITE
retryable
to indicate that the
passed Throwable
does not provide any new
information on the state of the object that threw it.
retryable(java.lang.Throwable)
,
Constant Field Valuespublic static final int BAD_INVOCATION
retryable
to indicate that the
passed Throwable
implies that retrying the
operation that threw the Throwable
with the same
arguments and the same expected return value would not be
fruitful.
retryable(java.lang.Throwable)
,
Constant Field Valuespublic static final int BAD_OBJECT
retryable
to indicate that the
passed Throwable
implies that any further
operations on the object that threw the Throwable
would not be fruitful.
retryable(java.lang.Throwable)
,
Constant Field Valuespublic static final int UNCATEGORIZED
retryable
to indicate that the
passed Throwable
was of a type that could not be
classified.
retryable(java.lang.Throwable)
,
Constant Field ValuesConstructor Detail |
---|
public ThrowableConstants()
Method Detail |
---|
public static int retryable(Throwable t)
Throwable
in terms of
what it implies about the probability of success of future operations
on the object that threw the exception.
Note, the classification used by this method tends to assume
the worst. For exceptions that represent conditions that could
get better by themselves but probably will not, it will return
BAD_OBJECT
or BAD_INVOCATION
instead
of INDEFINITE
. This makes it suitable for
situations where it is better to give up, fail early, and
notify the next layer up that something is wrong than to
continue silently and retry. It is probably not a good choice
for situations where the stakes are higher, like deciding when
to give up on a prepared transaction.
INDEFINITE
, BAD_INVOCATION
,
or BAD_OBJECT
if the exception is a
RuntimeException
, Error
, or
java.rmi.RemoteException
depending on the details of
the Throwable
. Otherwise return
UNCATEGORIZED
NullPointerException
- if the passed Throwable
is
null
|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |