add job service to be able to cancel plot requests
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package org.lucares.pdb.api;
|
||||
|
||||
public class AbortException extends RuntimeException {
|
||||
|
||||
private static final long serialVersionUID = 7614132985675048490L;
|
||||
|
||||
public AbortException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public AbortException(final Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public static void abortIfInterrupted() throws AbortException {
|
||||
if (Thread.interrupted()) {
|
||||
throw new AbortException();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user