01: /**
02: *
03: */package org.drools.concurrent;
04:
05: import org.drools.FactHandle;
06: import org.drools.WorkingMemory;
07:
08: public class RetractObject implements Command, Future {
09: private FactHandle factHandle;
10: private volatile boolean done;
11: private Exception e;
12:
13: public RetractObject(final FactHandle factHandle) {
14: this .factHandle = factHandle;
15: }
16:
17: public void execute(final WorkingMemory workingMemory) {
18: workingMemory.retract(this .factHandle);
19: this .done = true;
20:
21: }
22:
23: public Object getObject() {
24: return null;
25: }
26:
27: public boolean isDone() {
28: return this .done;
29: }
30:
31: public boolean exceptionThrown() {
32: return e != null;
33: }
34:
35: public Exception getException() {
36: return this.e;
37: }
38: }
|