Search in sources :

Example 1 with Output

use of io.engineblock.activityapi.output.Output in project engineblock by engineblock.

the class ContiguousOutputChunker method close.

@Override
public synchronized void close() throws Exception {
    try {
        mutex.acquire();
        ByteTrackerExtent e = this.markingExtents.get();
        while (e != null) {
            onFullyFilled(e);
            e = e.getNextExtent().get();
        }
        mutex.release();
        for (Output reader : this.readers) {
            logger.debug("closing downstream reader: " + reader);
            reader.close();
        }
    } catch (Throwable t) {
        logger.error("Error while attempting to close " + this + ": " + t, t);
        throw t;
    }
}
Also used : Output(io.engineblock.activityapi.output.Output)

Example 2 with Output

use of io.engineblock.activityapi.output.Output in project engineblock by engineblock.

the class CoreMotorDispenser method getMotor.

@Override
public Motor getMotor(ActivityDef activityDef, int slotId) {
    Action action = actionDispenser.getAction(slotId);
    Input input = inputDispenser.getInput(slotId);
    Output output = null;
    if (outputDispenser != null) {
        output = outputDispenser.getOutput(slotId);
    }
    IntPredicate resultFilter = null;
    Motor am = new CoreMotor(activity, slotId, input, action, output);
    return am;
}
Also used : Input(io.engineblock.activityapi.input.Input) IntPredicate(java.util.function.IntPredicate) Output(io.engineblock.activityapi.output.Output)

Aggregations

Output (io.engineblock.activityapi.output.Output)2 Input (io.engineblock.activityapi.input.Input)1 IntPredicate (java.util.function.IntPredicate)1