mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-13 14:12:11 +00:00
Implemented a check to skip the exection of already scheduled instructions, if the responsible processor has been aborted
This commit is contained in:
1 parent
2eac74ee95
commit
ca00f7484c
2 files changed
+9
-5
No files matched your search
+5
-3
@@ -2,9 +2,11 @@ package com.sap.sse.datamining.components;
|
||||
|
||||
public interface ProcessorInstructionHandler<ResultType> {
|
||||
|
||||
public void instructionSucceeded(ResultType result);
|
||||
public void instructionFailed(Exception e);
|
||||
boolean isAborted();
|
||||
|
||||
public void afterInstructionFinished();
|
||||
void instructionSucceeded(ResultType result);
|
||||
void instructionFailed(Exception e);
|
||||
|
||||
void afterInstructionFinished();
|
||||
|
||||
}
|
||||
+4
-2
@@ -52,8 +52,10 @@ public abstract class AbstractProcessorInstruction<ResultType> implements Proces
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
ResultType result = computeResult();
|
||||
handler.instructionSucceeded(result);
|
||||
if (!handler.isAborted()) {
|
||||
ResultType result = computeResult();
|
||||
handler.instructionSucceeded(result);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
handler.instructionFailed(e);
|
||||
} finally {
|
||||
|
||||
Reference in new issue
Block a user