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

extracted default capacity as constant

parent 91629b5b
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,8 @@ import teetime.framework.pipe.InstantiationPipe; ...@@ -31,6 +31,8 @@ import teetime.framework.pipe.InstantiationPipe;
*/ */
public final class ConfigurationContext { public final class ConfigurationContext {
private static final int DEFAULT_CAPACITY = 4;
private static final Logger LOGGER = LoggerFactory.getLogger(ConfigurationContext.class); private static final Logger LOGGER = LoggerFactory.getLogger(ConfigurationContext.class);
private final Set<Stage> threadableStages = new HashSet<Stage>(); private final Set<Stage> threadableStages = new HashSet<Stage>();
...@@ -54,7 +56,7 @@ public final class ConfigurationContext { ...@@ -54,7 +56,7 @@ public final class ConfigurationContext {
} }
/** /**
* Connects two ports with a pipe with a default capacity of currently 4 * Connects two ports with a pipe with a default capacity of currently {@value #DEFAULT_CAPACITY}.
* *
* @param sourcePort * @param sourcePort
* {@link OutputPort} of the sending stage * {@link OutputPort} of the sending stage
...@@ -64,7 +66,7 @@ public final class ConfigurationContext { ...@@ -64,7 +66,7 @@ public final class ConfigurationContext {
* the type of elements to be sent * the type of elements to be sent
*/ */
final <T> void connectPorts(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort) { final <T> void connectPorts(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort) {
connectPorts(sourcePort, targetPort, 4); connectPorts(sourcePort, targetPort, DEFAULT_CAPACITY);
} }
/** /**
......
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