diff --git a/pom.xml b/pom.xml index 6d9008525be26c59b915b0e7c567ad88cf728538..7572b9f9c6e03a4ba9ec66cec5f607bcd47b07a1 100644 --- a/pom.xml +++ b/pom.xml @@ -190,6 +190,25 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>${javadoc.version}</version> + <configuration> + <tags> + <tag> + <name>stage.input</name> + <placement>t</placement> + <head>Stage input:</head> + </tag> + <tag> + <name>stage.output</name> + <placement>t</placement> + <head>Stage output:</head> + </tag> + <tag> + <name>stage.sketch</name> + <placement>t</placement> + <head>Stage sketch:</head> + </tag> + </tags> + </configuration> <executions> <execution> <id>attach-javadocs</id> @@ -414,6 +433,23 @@ <version>${javadoc.version}</version> <configuration> <destDir>${javadocOutputDir}</destDir> + <tags> + <tag> + <name>stage.input</name> + <placement>t</placement> + <head>Stage input:</head> + </tag> + <tag> + <name>stage.output</name> + <placement>t</placement> + <head>Stage output:</head> + </tag> + <tag> + <name>stage.sketch</name> + <placement>t</placement> + <head>Stage sketch:</head> + </tag> + </tags> </configuration> </plugin> </plugins> diff --git a/src/main/java/teetime/stage/Clock.java b/src/main/java/teetime/stage/Clock.java index 19a1dae1b818925df80277b2e9609f80aecd5a86..fd5713342d003e2616a16b764f029af8379a3d8f 100644 --- a/src/main/java/teetime/stage/Clock.java +++ b/src/main/java/teetime/stage/Clock.java @@ -18,11 +18,37 @@ package teetime.stage; import teetime.framework.AbstractProducerStage; import teetime.framework.TerminationStrategy; +/** + * This stage sends the current timestamp repeatedly with a given interval delay of {@link #intervalDelayInMs}. + * + * @stage.sketch + * + * <pre> + * +------------------------+ + * | | + * | +---+ + * | *INTERVAL* +--> | | + * | +---+ + * | | + * +------------------------+ + * </pre> + * + * @author Nelson Tavares de Sousa + * + * @stage.output Current timestamp as long. + * + */ public final class Clock extends AbstractProducerStage<Long> { private boolean initialDelayExceeded = false; + /** + * Waiting time span until first sent element. + */ private long initialDelayInMs; + /** + * Interval between two sent elements in ms. + */ private long intervalDelayInMs; @Override diff --git a/src/main/java/teetime/stage/basic/distributor/Distributor.java b/src/main/java/teetime/stage/basic/distributor/Distributor.java index fe7aee22e637c533df52d90f2ee7c0078a2dcf7e..64e175d0dea46315797223ca78b9caab50207110 100644 --- a/src/main/java/teetime/stage/basic/distributor/Distributor.java +++ b/src/main/java/teetime/stage/basic/distributor/Distributor.java @@ -23,12 +23,36 @@ import teetime.stage.basic.distributor.strategy.IDistributorStrategy; import teetime.stage.basic.distributor.strategy.RoundRobinStrategy2; /** - * @author Christian Wulf + * New output ports can be created by calling {@link #getNewOutputPort()}. + * + * @stage.sketch + * + * <pre> + * +----------------------------+ + * | | + * | +---+ + * | +------------> | | + * | | +---+ + * | | | + * +---+ | + * | | +-------+--- . . . . + * +---+ | + * | | | + * | | +---+ + * | +------------> | | + * | +---+ + * | | + * +----------------------------+ + * </pre> + * + * @stage.output The incoming element will be passed to output ports, which are selected by a strategy. + * + * @author Christian Wulf, Nelson Tavares de Sousa * * @since 1.0 * - * @param T - * the type of the input port and the output ports + * @param <T> + * the type of both the input and output ports */ public class Distributor<T> extends AbstractConsumerStage<T> { diff --git a/src/main/java/teetime/stage/basic/merger/Merger.java b/src/main/java/teetime/stage/basic/merger/Merger.java index 1ed92585e37423346a2a4ee319f03d7872835c87..9f6ca96b0009a5bbae9f15857474d9b70790830e 100644 --- a/src/main/java/teetime/stage/basic/merger/Merger.java +++ b/src/main/java/teetime/stage/basic/merger/Merger.java @@ -20,21 +20,42 @@ import java.util.List; import teetime.framework.AbstractStage; import teetime.framework.InputPort; import teetime.framework.OutputPort; -import teetime.framework.signal.ISignal; import teetime.stage.basic.merger.strategy.IMergerStrategy; import teetime.stage.basic.merger.strategy.RoundRobinStrategy; /** * * This stage merges data from the input ports, by taking elements according to the chosen merge strategy and by putting them to the output port. - * For its signal handling behavior see {@link #onSignal(ISignal, InputPort)} + * New input ports can be created by calling {@link #getNewInputPort()}. * - * @author Christian Wulf, Nelson Tavares de Sousa + * @stage.sketch + * + * <pre> + * +---------------------------+ + * | | + * +---+ | + * | | +-----------+ | + * +---+ | | + * | | | + * | +---+ + * . . . . ---+-------> | | + * | +---+ + * | | | + * +---+ | | + * | | +-----------+ | + * +---+ | + * | | + * +---------------------------+ + * + * + * </pre> + * + * @author Christian Wulf * * @since 1.0 * - * @param <T> - * the type of both the input and output ports + * @param T + * the type of the input port and the output ports */ public class Merger<T> extends AbstractStage {