public Flow getLast() { return child == null ? this : child.getLast(); } }
@Override protected void onEnd() { child.onEnd(); }
@Override protected void process() { FlowProcessor<Long, ?> child = this.child; for (long t : array) { if (stop) break; child.process(t); } } };
@Override public <T extends FlowProcessor<B, C>, C> T then(T command) { output = new LinkedBlockingQueue<B>(); blocking = true; return super.then(command); }
@Override protected void start() { if (!started) { started = true; super.start(); } }
@Override protected void stop() { stopped = true; super.stop(); }
public void doInAsyncTask() { try { Flow<B> flow = mapper.map(take()); flow.then(new FlowProcessor<B, B>() { @Override public void process(B b) { try { if (blocking) output.put(b); notifyIfWaiting(); } catch (InterruptedException e) { throw Unchecked.rethrow(e); } } @Override protected void onEnd() { endTask(); } }).execute(); } catch (Exception ex) { endTask(); throw Unchecked.rethrow(ex); } }
@Override public <T extends FlowProcessor<B, C>, C> T then(T command) { output = new LinkedBlockingQueue<B>(); blocking = true; return super.then(command); }
@Override protected void start() { if (!started) { started = true; super.start(); } }
@Override protected void stop() { stopped = true; super.stop(); }
public void doInAsyncTask() { try { Flow<B> flow = mapper.map(take()); flow.then(new FlowProcessor<B, B>() { @Override public void process(B b) { try { if (blocking) output.put(b); notifyIfWaiting(); } catch (InterruptedException e) { throw Unchecked.rethrow(e); } } @Override protected void onEnd() { endTask(); } }).execute(); } catch (Exception ex) { endTask(); throw Unchecked.rethrow(ex); } }
@Override protected void process() { FlowProcessor<Short, ?> child = this.child; for (short t : array) { if (stop) break; child.process(t); } } };
protected void onEnd() { if (child != null) child.onEnd(); }
@Override protected void process() { FlowProcessor<T, ?> child = this.child; for (Flow<T> flow : flows) { if (stop) break; flow.then(noopOnEnd).then(child); start(flow); } } };
public Flow getLast() { return child == null ? this : child.getLast(); } }
@Override protected void process() { FlowProcessor<Short, ?> child = this.child; for (short t : array) { if (stop) break; child.process(t); } } };
protected void onEnd() { if (child != null) child.onEnd(); }
@Override protected void process() { FlowProcessor<T, ?> child = this.child; for (Flow<T> flow : flows) { if (stop) break; flow.then(noopOnEnd).then(child); start(flow); } } };
@Override public void process(B b) { if (counter >= number) child.process(b); else counter++; } });
@Override protected void onEnd() { child.onEnd(); }