/** * * @param gm * @param parallelId * @param input _in_ The payload that will be routed. * @param outputs _out_ The HTTP request parsed from the NetPayloadSchema. * @param errorResponsePipe _out If error occurs, it will be written to this pipe. * @param log _out_ Logging output. * @param ackStop _out_ Acknowledgment for ReleaseSchema. * @param config * @param coordinator * @param catchAll */ public HTTP1xRouterStage(GraphManager gm, int parallelId, Pipe<NetPayloadSchema>[] input, Pipe<HTTPRequestSchema>[][] outputs, Pipe<ServerResponseSchema> errorResponsePipe, Pipe<HTTPLogRequestSchema> log, Pipe<ReleaseSchema> ackStop, HTTPRouterStageConfig<T,R,V,H> config, ServerCoordinator coordinator, boolean catchAll) { this(gm, parallelId, input, join(outputs), errorResponsePipe, log, ackStop, config, coordinator, catchAll); int inMaxVar = PronghornStage.maxVarLength(input); int outMaxVar = PronghornStage.minVarLength(outputs); if (outMaxVar <= inMaxVar) { throw new UnsupportedOperationException("Input has field lenght of "+inMaxVar+" while output pipe is "+outMaxVar+", output must be larger"); } }
this.rollingSize = PronghornStage.maxVarLength(encryptedContent)*2;
public JoinBlockingBehavior(MsgRuntime<?,?,?> msgRuntime, Pipe<RawDataSchema>[] inputPipes, String[] targetTopics, TargetSelector selector) { this.inputPipes = inputPipes; this.selector = selector; PipeConfigManager pcm = new PipeConfigManager(4, MsgRuntime.defaultCommandChannelLength, MsgRuntime.defaultCommandChannelMaxPayload); BuilderImpl builder = MsgRuntime.builder(msgRuntime); int dataLen = PronghornStage.maxVarLength(inputPipes); int count = inputPipes[0].config().minimumFragmentsOnPipe(); //build each of the target publish services so they can be indexed by targetTopics position targetService = new PubSubFixedTopicService[targetTopics.length]; int i = targetTopics.length; while (--i>=0) { targetService[i] = builder.newCommandChannel(msgRuntime.constructingParallelInstance(), pcm) .newPubSubService(targetTopics[i], count, dataLen); } }