diff --git a/src/main/java/teetime/framework/Analysis.java b/src/main/java/teetime/framework/Analysis.java index 4f8c403d00776b1b80eec960bc1f0f17030b1eb0..899ac7faf8d315957d2d1f9453e66ddc42599cdd 100644 --- a/src/main/java/teetime/framework/Analysis.java +++ b/src/main/java/teetime/framework/Analysis.java @@ -35,7 +35,7 @@ import teetime.util.Pair; * To start the analysis {@link #init()} and {@link #start()} need to be executed in this order. * This class will automatically create threads and join them without any further commitment. */ -public class Analysis implements UncaughtExceptionHandler { +public final class Analysis implements UncaughtExceptionHandler { private static final Logger LOGGER = LoggerFactory.getLogger(Analysis.class); diff --git a/src/main/java/teetime/framework/AnalysisConfiguration.java b/src/main/java/teetime/framework/AnalysisConfiguration.java index 62909734d9989691dbd64cf25906f1a55a026618..ef5ae8a4bd7df6c67d878c709bba15dfcf039455 100644 --- a/src/main/java/teetime/framework/AnalysisConfiguration.java +++ b/src/main/java/teetime/framework/AnalysisConfiguration.java @@ -24,7 +24,7 @@ import teetime.framework.pipe.PipeFactoryRegistry; * Represents a configuration of connected stages, which is needed to run a analysis. * Stages can be added by executing {@link #addThreadableStage(Stage)}. */ -public class AnalysisConfiguration { +public abstract class AnalysisConfiguration { protected static final PipeFactoryRegistry PIPE_FACTORY_REGISTRY = PipeFactoryRegistry.INSTANCE; private final List<Stage> threadableStageJobs = new LinkedList<Stage>(); diff --git a/src/main/java/teetime/framework/pipe/CommittablePipeFactory.java b/src/main/java/teetime/framework/pipe/CommittablePipeFactory.java index 52f70fc1e4e7f75c16c2505494c03f3db41d7ef4..85bb67e7593e1dcbdcc6d5c2179e33a9e46c4a3e 100644 --- a/src/main/java/teetime/framework/pipe/CommittablePipeFactory.java +++ b/src/main/java/teetime/framework/pipe/CommittablePipeFactory.java @@ -20,7 +20,7 @@ import teetime.framework.OutputPort; import teetime.framework.pipe.PipeFactoryRegistry.PipeOrdering; import teetime.framework.pipe.PipeFactoryRegistry.ThreadCommunication; -public class CommittablePipeFactory implements IPipeFactory { +public final class CommittablePipeFactory implements IPipeFactory { @Override public <T> IPipe create(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort) { diff --git a/src/main/java/teetime/framework/pipe/CouldNotFindPipeImplException.java b/src/main/java/teetime/framework/pipe/CouldNotFindPipeImplException.java index 6ea8d759a7d0e2be0947390949dd384769e386d1..6f2f1ee6b5b833aec521e718567bb8bc5ead5eca 100644 --- a/src/main/java/teetime/framework/pipe/CouldNotFindPipeImplException.java +++ b/src/main/java/teetime/framework/pipe/CouldNotFindPipeImplException.java @@ -15,7 +15,7 @@ */ package teetime.framework.pipe; -public class CouldNotFindPipeImplException extends RuntimeException { +public final class CouldNotFindPipeImplException extends RuntimeException { private static final long serialVersionUID = 5242260988104493402L; diff --git a/src/main/java/teetime/framework/pipe/OrderedGrowableArrayPipeFactory.java b/src/main/java/teetime/framework/pipe/OrderedGrowableArrayPipeFactory.java index 21a88a9c3d2a24a30e8209130362f392f90bf079..bd65862ff7b4118441aca4ce1b22d7d1cabbd828 100644 --- a/src/main/java/teetime/framework/pipe/OrderedGrowableArrayPipeFactory.java +++ b/src/main/java/teetime/framework/pipe/OrderedGrowableArrayPipeFactory.java @@ -20,7 +20,7 @@ import teetime.framework.OutputPort; import teetime.framework.pipe.PipeFactoryRegistry.PipeOrdering; import teetime.framework.pipe.PipeFactoryRegistry.ThreadCommunication; -public class OrderedGrowableArrayPipeFactory implements IPipeFactory { +public final class OrderedGrowableArrayPipeFactory implements IPipeFactory { @Override public <T> IPipe create(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort) { diff --git a/src/main/java/teetime/framework/pipe/SingleElementPipeFactory.java b/src/main/java/teetime/framework/pipe/SingleElementPipeFactory.java index 830a25d13c7338408fb8d629d305b3ccf38609bb..e8a1a7af9bf188360dc3577c5583704384c7f5c6 100644 --- a/src/main/java/teetime/framework/pipe/SingleElementPipeFactory.java +++ b/src/main/java/teetime/framework/pipe/SingleElementPipeFactory.java @@ -20,7 +20,7 @@ import teetime.framework.OutputPort; import teetime.framework.pipe.PipeFactoryRegistry.PipeOrdering; import teetime.framework.pipe.PipeFactoryRegistry.ThreadCommunication; -public class SingleElementPipeFactory implements IPipeFactory { +public final class SingleElementPipeFactory implements IPipeFactory { @Override public <T> IPipe create(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort) { diff --git a/src/main/java/teetime/framework/pipe/SpScPipeFactory.java b/src/main/java/teetime/framework/pipe/SpScPipeFactory.java index 035d789da1ec94a640ccdaddd6a0b9efafa878fa..d36f76b3e103a2d65840647ca74708b987a416ea 100644 --- a/src/main/java/teetime/framework/pipe/SpScPipeFactory.java +++ b/src/main/java/teetime/framework/pipe/SpScPipeFactory.java @@ -20,7 +20,7 @@ import teetime.framework.OutputPort; import teetime.framework.pipe.PipeFactoryRegistry.PipeOrdering; import teetime.framework.pipe.PipeFactoryRegistry.ThreadCommunication; -public class SpScPipeFactory implements IPipeFactory { +public final class SpScPipeFactory implements IPipeFactory { @Override public <T> IPipe create(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort) { diff --git a/src/main/java/teetime/framework/pipe/UnorderedGrowablePipeFactory.java b/src/main/java/teetime/framework/pipe/UnorderedGrowablePipeFactory.java index 9eb081c9ea376f9ca42727e77baf3cce51583172..a3d1c80226fdddacab82a7af8f3c0dea306294c6 100644 --- a/src/main/java/teetime/framework/pipe/UnorderedGrowablePipeFactory.java +++ b/src/main/java/teetime/framework/pipe/UnorderedGrowablePipeFactory.java @@ -20,7 +20,7 @@ import teetime.framework.OutputPort; import teetime.framework.pipe.PipeFactoryRegistry.PipeOrdering; import teetime.framework.pipe.PipeFactoryRegistry.ThreadCommunication; -public class UnorderedGrowablePipeFactory implements IPipeFactory { +public final class UnorderedGrowablePipeFactory implements IPipeFactory { @Override public <T> IPipe create(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort) { diff --git a/src/main/java/teetime/framework/signal/StartingSignal.java b/src/main/java/teetime/framework/signal/StartingSignal.java index 5e10fcc0c18155b5c2f850c5aeeead53edaae62a..646443bec562e3a3bcb7851a6f707accee9e3a59 100644 --- a/src/main/java/teetime/framework/signal/StartingSignal.java +++ b/src/main/java/teetime/framework/signal/StartingSignal.java @@ -23,7 +23,7 @@ import org.slf4j.LoggerFactory; import teetime.framework.AbstractStage; -public class StartingSignal implements ISignal { +public final class StartingSignal implements ISignal { private static final Logger LOGGER = LoggerFactory.getLogger(StartingSignal.class); private final List<Exception> catchedExceptions = new LinkedList<Exception>(); diff --git a/src/main/java/teetime/framework/signal/TerminatingSignal.java b/src/main/java/teetime/framework/signal/TerminatingSignal.java index 52d5be48e4eb323f52fe43887a73fa14db23f0de..d43f21f35741aeba9672a4f0b4e2395106fd5045 100644 --- a/src/main/java/teetime/framework/signal/TerminatingSignal.java +++ b/src/main/java/teetime/framework/signal/TerminatingSignal.java @@ -23,7 +23,7 @@ import org.slf4j.LoggerFactory; import teetime.framework.AbstractStage; -public class TerminatingSignal implements ISignal { +public final class TerminatingSignal implements ISignal { private static final Logger LOGGER = LoggerFactory.getLogger(TerminatingSignal.class); private final List<Exception> catchedExceptions = new LinkedList<Exception>(); diff --git a/src/main/java/teetime/framework/signal/ValidatingSignal.java b/src/main/java/teetime/framework/signal/ValidatingSignal.java index e351cbacbcd4be214cd29b60b474a1c5dd54a662..51757ca295094a635e37d28df0cf0aee2823d0b7 100644 --- a/src/main/java/teetime/framework/signal/ValidatingSignal.java +++ b/src/main/java/teetime/framework/signal/ValidatingSignal.java @@ -21,7 +21,7 @@ import java.util.List; import teetime.framework.AbstractStage; import teetime.framework.validation.InvalidPortConnection; -public class ValidatingSignal implements ISignal { +public final class ValidatingSignal implements ISignal { private final List<InvalidPortConnection> invalidPortConnections = new LinkedList<InvalidPortConnection>(); diff --git a/src/test/java/teetime/framework/pipe/DummyFactory.java b/src/test/java/teetime/framework/pipe/DummyFactory.java index 3db1330b46dbe92547d11018029dd7638d3d098a..4d2b328cf52caf4c206b3be75c7b117781d43a77 100644 --- a/src/test/java/teetime/framework/pipe/DummyFactory.java +++ b/src/test/java/teetime/framework/pipe/DummyFactory.java @@ -15,10 +15,36 @@ */ package teetime.framework.pipe; -public class DummyFactory extends SpScPipeFactory { +import teetime.framework.InputPort; +import teetime.framework.OutputPort; +import teetime.framework.pipe.PipeFactoryRegistry.PipeOrdering; +import teetime.framework.pipe.PipeFactoryRegistry.ThreadCommunication; - public DummyFactory() { - super(); +public final class DummyFactory implements IPipeFactory { + + @Override + public <T> IPipe create(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort) { + return this.create(sourcePort, targetPort, 4); + } + + @Override + public <T> IPipe create(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort, final int capacity) { + return new SpScPipe(sourcePort, targetPort, capacity); + } + + @Override + public ThreadCommunication getThreadCommunication() { + return ThreadCommunication.INTER; + } + + @Override + public PipeOrdering getOrdering() { + return PipeOrdering.QUEUE_BASED; + } + + @Override + public boolean isGrowable() { + return false; } }