diff --git a/src/main/java/teetime/framework/AnalysisConfiguration.java b/src/main/java/teetime/framework/AnalysisConfiguration.java index 9755a33c8ce7334976298d600c74f2d1275fdeba..4a4c89012f80db87e5d8345a68f9a7aee3ce5bfe 100644 --- a/src/main/java/teetime/framework/AnalysisConfiguration.java +++ b/src/main/java/teetime/framework/AnalysisConfiguration.java @@ -145,10 +145,28 @@ public abstract class AnalysisConfiguration { return interUnboundedThreadFactory.create(sourcePort, targetPort, capacity); } + /** + * Connects two ports with a pipe. + * + * @param sourcePort + * port from the sending stage + * @param targetPort + * port from the receiving stage + */ protected <T> void connectPorts(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort) { connectPorts(sourcePort, targetPort, 4); } + /** + * Connects to ports with a pipe of a certain capacity + * + * @param sourcePort + * port from the sending stage + * @param targetPort + * port from the receiving stage + * @param capacity + * the pipe is set to this capacity, if the value is greater than 0. If it is 0, than the pipe is unbounded, thus growing of the pipe is enabled. + */ protected <T> void connectPorts(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort, final int capacity) { connections.add(new Connection(sourcePort, targetPort, capacity)); }