public class CoordinationException extends RuntimeException
Modifier and Type | Field and Description |
---|---|
static int |
ALREADY_ENDED
The Coordination has already terminated normally.
|
static int |
ALREADY_PUSHED
The Coordination was already on a thread's thread local Coordination
stack.
|
static int |
DEADLOCK_DETECTED
Registering a Participant with a Coordination would have resulted in a
deadlock.
|
static int |
FAILED
The Coordination has terminated as a failure with
Coordination.fail(Throwable) . |
static int |
LOCK_INTERRUPTED
The current thread was interrupted while waiting to register a
Participant with a Coordination.
|
static int |
PARTIALLY_ENDED
The Coordination has partially ended.
|
static int |
UNKNOWN
Unknown reason for this exception.
|
static int |
WRONG_THREAD
The Coordination cannot be ended by the calling thread since the
Coordination is on the thread local Coordination stack of another thread.
|
Constructor and Description |
---|
CoordinationException(String message,
Coordination coordination,
int type)
Create a new Coordination Exception.
|
CoordinationException(String message,
Coordination coordination,
int type,
Throwable cause)
Create a new Coordination Exception with a cause.
|
Modifier and Type | Method and Description |
---|---|
long |
getId()
Returns the id of the
Coordination associated with this
exception. |
String |
getName()
Returns the name of the
Coordination associated with this
exception. |
int |
getType()
Returns the type for this exception.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final int UNKNOWN
public static final int DEADLOCK_DETECTED
public static final int FAILED
Coordination.fail(Throwable)
. When this exception type is used,
the Throwable.getCause()
method must return a non-null value.public static final int PARTIALLY_ENDED
public static final int ALREADY_ENDED
public static final int ALREADY_PUSHED
public static final int LOCK_INTERRUPTED
public static final int WRONG_THREAD
public CoordinationException(String message, Coordination coordination, int type, Throwable cause)
message
- The detail message for this exception.coordination
- The Coordination associated with this exception.cause
- The cause associated with this exception.type
- The type of this exception.IllegalArgumentException
- If the specified type is FAILED
and the specified cause is null
.public CoordinationException(String message, Coordination coordination, int type)
message
- The detail message for this exception.coordination
- The Coordination associated with this exception.type
- The type of this exception.IllegalArgumentException
- If the specified type is FAILED
.public String getName()
Coordination
associated with this
exception."<>"
if no Coordination is associated with this
exception.public int getType()
public long getId()
Coordination
associated with this
exception.-1
if no Coordination is associated with this exception.Copyright © Contributors to the Eclipse Foundation Licensed under the Eclipse Foundation Specification License – v1.0