public class ServiceInterruption
extends java.lang.Exception
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_rcsid |
protected boolean |
abortOnFail
Should we abort the process if failure condition has been reached?
|
protected int |
failRetryCount
This is the number of retries to permit before FAIL.
|
protected long |
failTime
This is the time (in milliseconds since epoch) to FAIL if no successful read has yet occurred.
|
protected boolean |
jobInactiveAbort
True if job inactive abort.
|
protected long |
retryTime
This is the time (in milliseconds since epoch) when to retry the request.
|
Constructor and Description |
---|
ServiceInterruption(java.lang.String message,
long retryTime)
Constructor.
|
ServiceInterruption(java.lang.String message,
long retryTime,
boolean jobInactiveAbort)
Constructor.
|
ServiceInterruption(java.lang.String message,
java.lang.Throwable failureCause,
long retryTime,
long failTime,
int failRetryCount,
boolean abortOnFail)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getFailRetryCount()
Get the number of error iterations needed before failure should be declared.
|
long |
getFailTime()
Get the fail time.
|
long |
getRetryTime()
Get the retry time.
|
boolean |
isAbortOnFail()
On failure, should we abort?
|
boolean |
jobInactiveAbort()
Check if this service interruption is due to a job aborting.
|
public static final java.lang.String _rcsid
protected long retryTime
protected long failTime
protected int failRetryCount
protected boolean abortOnFail
protected boolean jobInactiveAbort
public ServiceInterruption(java.lang.String message, long retryTime)
message
- is the exact error condition.retryTime
- is the time to retry.public ServiceInterruption(java.lang.String message, long retryTime, boolean jobInactiveAbort)
message
- is the exact error condition.retryTime
- is the time to retry.jobInactiveAbort
- is true if this exception being thrown because the job is abortingpublic ServiceInterruption(java.lang.String message, java.lang.Throwable failureCause, long retryTime, long failTime, int failRetryCount, boolean abortOnFail)
message
- is the exact error condition.failureCause
- is an exception that should be reported if it is decided to abort the process.retryTime
- is the time to retry.failTime
- is the time to fail.failRetryCount
- is the number of times to retry before declaring failure.abortOnFail
- signals what to do if failure. Setting this to "true" will cause whatever process incurred the
service interruption to stop immediately, if failure condition has been reached.public long getRetryTime()
public long getFailTime()
public int getFailRetryCount()
public boolean isAbortOnFail()
public boolean jobInactiveAbort()