/** * This is a hook method that may be overriden by subclasses. Please keep it protected. * * @param context * @param workingMemory * @param leftTuple * @param sink */ protected void doPropagateRetractLeftTuple( PropagationContext context, InternalWorkingMemory workingMemory, LeftTuple leftTuple, LeftTupleSink sink) { sink.retractLeftTuple(leftTuple, context, workingMemory); }
protected void doPropagateRetractLeftTuple( PropagationContext context, InternalWorkingMemory workingMemory, LeftTuple leftTuple, LeftTupleSink sink) { // composite propagators need to check each node to decide if the propagation // must be asynchronous or may eventually be synchronous if (this.partitionId.equals(sink.getPartitionId())) { // same partition, so synchronous propagation is fine sink.retractLeftTuple(leftTuple, context, workingMemory); } else { // different partition, so use asynchronous propagation PartitionTaskManager manager = workingMemory.getPartitionTaskManager(this.partitionId); manager.enqueue( new PartitionTaskManager.LeftTupleRetractAction( leftTuple, context, sink, Action.PRIORITY_HIGH)); } }