public Pipe<MessagePrivate> getPipe(int activeIndex) { if (null==p) { p = new Pipe[builder.parallelTracks()]; } if (activeIndex>maxIndex) { throw new UnsupportedOperationException("can not span between primary and tracks with private topic"); } if (activeIndex<0) { //confirm that this topic was never used for tracks since we have a single request for(int i = 1; i<p.length; i++) { if (null!=p[i]) { throw new UnsupportedOperationException("can not span between primary and tracks with private topic"); } } maxIndex = 0; activeIndex = 0; } Pipe<MessagePrivate> result = p[activeIndex]; if (null == result) { result = p[activeIndex] = PipeConfig.pipe(config); } return result; }
PronghornStage generator = new TestGenerator(gm, seed, iterations, pipe(busConfig)); ReplicatorStage splitter = new ReplicatorStage(gm, getOutputPipe(gm, generator), pipe(busConfig.grow2x()), pipe(busConfig.grow2x())); PronghornStage validateResults = new TestValidator(gm, getOutputPipe(gm, splitter, 2), getOutputPipe(gm, splitter, 1));