Skip to content
Snippets Groups Projects
Commit 51c3b1df authored by Nelson Tavares de Sousa's avatar Nelson Tavares de Sousa
Browse files

modified javadoc

removed deprecated method
parent 7fff8d6d
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,9 @@ import teetime.framework.OutputPort;
import teetime.framework.pipe.PipeFactoryRegistry.PipeOrdering;
import teetime.framework.pipe.PipeFactoryRegistry.ThreadCommunication;
/**
* Represents the interface, which is must be defined in every PipeFactory
*/
public interface IPipeFactory {
/**
......
......@@ -20,14 +20,14 @@ public class PipeFactoryRegistry {
private static final Logger LOGGER = LoggerFactory.getLogger(PipeFactoryRegistry.class);
/**
* Communication type between two connected stages
* Represent a communication type between two connected stages
*/
public enum ThreadCommunication {
INTER, INTRA
}
/**
* Specifies the ordering behavior of the pipe
* Represents the ordering behavior of a pipe
*/
public enum PipeOrdering {
/**
......@@ -56,22 +56,6 @@ public class PipeFactoryRegistry {
}
}
/**
* @deprecated Use {@link IPipeFactory#create(OutputPort, InputPort, int)} instead,
* after obtaining a PipeFactory with {@link #getPipeFactory(ThreadCommunication, PipeOrdering, boolean)}.
*
* @param tc
* @param ordering
* @param growable
* @param capacity
* @return
*/
@Deprecated
public IPipe create(final ThreadCommunication tc, final PipeOrdering ordering, final boolean growable, final int capacity) {
IPipeFactory pipeFactory = getPipeFactory(tc, ordering, growable);
return pipeFactory.create(capacity);
}
/**
* Returns a PipeFactory Instance.
*
......
......@@ -3,6 +3,7 @@ package teetime.examples.cipher;
import java.io.File;
import teetime.framework.AnalysisConfiguration;
import teetime.framework.pipe.IPipeFactory;
import teetime.framework.pipe.PipeFactoryRegistry.PipeOrdering;
import teetime.framework.pipe.PipeFactoryRegistry.ThreadCommunication;
import teetime.stage.CipherByteArray;
......@@ -27,18 +28,14 @@ public class CipherConfiguration extends AnalysisConfiguration {
CipherByteArray decrypt = new CipherByteArray(password, CipherMode.DECRYPT);
ByteArrayFileWriter writer = new ByteArrayFileWriter(output);
PIPE_FACTORY_REGISTRY.getPipeFactory(ThreadCommunication.INTRA, PipeOrdering.ARBITRARY, false)
.create(init.getOutputPort(), f2b.getInputPort());
PIPE_FACTORY_REGISTRY.getPipeFactory(ThreadCommunication.INTRA, PipeOrdering.ARBITRARY, false)
.create(f2b.getOutputPort(), enc.getInputPort());
PIPE_FACTORY_REGISTRY.getPipeFactory(ThreadCommunication.INTRA, PipeOrdering.ARBITRARY, false)
.create(enc.getOutputPort(), comp.getInputPort());
PIPE_FACTORY_REGISTRY.getPipeFactory(ThreadCommunication.INTRA, PipeOrdering.ARBITRARY, false)
.create(comp.getOutputPort(), decomp.getInputPort());
PIPE_FACTORY_REGISTRY.getPipeFactory(ThreadCommunication.INTRA, PipeOrdering.ARBITRARY, false)
.create(decomp.getOutputPort(), decrypt.getInputPort());
PIPE_FACTORY_REGISTRY.getPipeFactory(ThreadCommunication.INTRA, PipeOrdering.ARBITRARY, false)
.create(decrypt.getOutputPort(), writer.getInputPort());
IPipeFactory factory = PIPE_FACTORY_REGISTRY.getPipeFactory(ThreadCommunication.INTRA, PipeOrdering.ARBITRARY, false);
factory.create(init.getOutputPort(), f2b.getInputPort());
factory.create(f2b.getOutputPort(), enc.getInputPort());
factory.create(enc.getOutputPort(), comp.getInputPort());
factory.create(comp.getOutputPort(), decomp.getInputPort());
factory.create(decomp.getOutputPort(), decrypt.getInputPort());
factory.create(decrypt.getOutputPort(), writer.getInputPort());
this.getFiniteProducerStages().add(init);
......
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