Skip to content
Snippets Groups Projects
Commit 7365df49 authored by Christian Wulf's avatar Christian Wulf
Browse files

Merge branch 'ascii-javadoc' into 'master'

Ascii javadoc

Added sketches which are more concisely than simple images.
Furthermore, this introduces new javadoc tags, such as: stage.output, stage.input and stage.sketch

See merge request !57
parents 33c6e59e 7dfb7dd1
No related branches found
No related tags found
No related merge requests found
...@@ -190,6 +190,25 @@ ...@@ -190,6 +190,25 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>${javadoc.version}</version> <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> <executions>
<execution> <execution>
<id>attach-javadocs</id> <id>attach-javadocs</id>
...@@ -414,6 +433,23 @@ ...@@ -414,6 +433,23 @@
<version>${javadoc.version}</version> <version>${javadoc.version}</version>
<configuration> <configuration>
<destDir>${javadocOutputDir}</destDir> <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> </configuration>
</plugin> </plugin>
</plugins> </plugins>
......
...@@ -18,11 +18,37 @@ package teetime.stage; ...@@ -18,11 +18,37 @@ package teetime.stage;
import teetime.framework.AbstractProducerStage; import teetime.framework.AbstractProducerStage;
import teetime.framework.TerminationStrategy; import teetime.framework.TerminationStrategy;
/**
* This stage sends the current timestamp repeatedly with a given interval delay of {@link #intervalDelayInMs}.
*
* @stage.sketch
*
* <pre>
* +------------------------+
* | |
* | +---+
* | *INTERVAL* +--&gt; | |
* | +---+
* | |
* +------------------------+
* </pre>
*
* @author Nelson Tavares de Sousa
*
* @stage.output Current timestamp as long.
*
*/
public final class Clock extends AbstractProducerStage<Long> { public final class Clock extends AbstractProducerStage<Long> {
private boolean initialDelayExceeded = false; private boolean initialDelayExceeded = false;
/**
* Waiting time span until first sent element.
*/
private long initialDelayInMs; private long initialDelayInMs;
/**
* Interval between two sent elements in ms.
*/
private long intervalDelayInMs; private long intervalDelayInMs;
@Override @Override
......
...@@ -23,12 +23,36 @@ import teetime.stage.basic.distributor.strategy.IDistributorStrategy; ...@@ -23,12 +23,36 @@ import teetime.stage.basic.distributor.strategy.IDistributorStrategy;
import teetime.stage.basic.distributor.strategy.RoundRobinStrategy2; import teetime.stage.basic.distributor.strategy.RoundRobinStrategy2;
/** /**
* @author Christian Wulf * New output ports can be created by calling {@link #getNewOutputPort()}.
*
* @stage.sketch
*
* <pre>
* +----------------------------+
* | |
* | +---+
* | +------------&gt; | |
* | | +---+
* | | |
* +---+ |
* | | +-------+--- . . . .
* +---+ |
* | | |
* | | +---+
* | +------------&gt; | |
* | +---+
* | |
* +----------------------------+
* </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 * @since 1.0
* *
* @param T * @param <T>
* the type of the input port and the output ports * the type of both the input and output ports
*/ */
public class Distributor<T> extends AbstractConsumerStage<T> { public class Distributor<T> extends AbstractConsumerStage<T> {
......
...@@ -20,21 +20,42 @@ import java.util.List; ...@@ -20,21 +20,42 @@ import java.util.List;
import teetime.framework.AbstractStage; import teetime.framework.AbstractStage;
import teetime.framework.InputPort; import teetime.framework.InputPort;
import teetime.framework.OutputPort; import teetime.framework.OutputPort;
import teetime.framework.signal.ISignal;
import teetime.stage.basic.merger.strategy.IMergerStrategy; import teetime.stage.basic.merger.strategy.IMergerStrategy;
import teetime.stage.basic.merger.strategy.RoundRobinStrategy; 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. * 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>
* +---------------------------+
* | |
* +---+ |
* | | +-----------+ |
* +---+ | |
* | | |
* | +---+
* . . . . ---+-------&gt; | |
* | +---+
* | | |
* +---+ | |
* | | +-----------+ |
* +---+ |
* | |
* +---------------------------+
*
*
* </pre>
*
* @author Christian Wulf
* *
* @since 1.0 * @since 1.0
* *
* @param <T> * @param T
* the type of both the input and output ports * the type of the input port and the output ports
*/ */
public class Merger<T> extends AbstractStage { public class Merger<T> extends AbstractStage {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment