add job service to be able to cancel plot requests

This commit is contained in:
2023-02-18 17:36:54 +01:00
parent 8c410fac4a
commit ed448af78c
18 changed files with 296 additions and 38 deletions

View File

@@ -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();
}
}
}