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

renamed the abstract pipe classes

parent 8289481f
No related branches found
No related tags found
No related merge requests found
......@@ -31,13 +31,13 @@ import teetime.util.framework.concurrent.queue.putstrategy.YieldPutStrategy;
import teetime.util.framework.concurrent.queue.takestrategy.SCParkTakeStrategy;
import teetime.util.framework.concurrent.queue.takestrategy.TakeStrategy;
public abstract class AbstractInterThreadPipe<T> extends AbstractPipe<T> {
public abstract class AbstractSynchedPipe<T> extends AbstractPipe<T> {
private final BlockingQueue<ISignal> signalQueue;
private volatile boolean closed;
protected AbstractInterThreadPipe(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort, final int capacity) {
protected AbstractSynchedPipe(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort, final int capacity) {
super(sourcePort, targetPort, capacity);
final Queue<ISignal> localSignalQueue = QueueFactory.newQueue(new ConcurrentQueueSpec(1, 1, 0, Ordering.FIFO, Preference.THROUGHPUT));
final PutStrategy<ISignal> putStrategy = new YieldPutStrategy<ISignal>();
......
......@@ -17,11 +17,11 @@ package teetime.framework;
import teetime.framework.signal.ISignal;
public abstract class AbstractIntraThreadPipe<T> extends AbstractPipe<T> {
public abstract class AbstractUnsynchedPipe<T> extends AbstractPipe<T> {
private boolean closed;
protected AbstractIntraThreadPipe(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort, final int capacity) {
protected AbstractUnsynchedPipe(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort, final int capacity) {
super(sourcePort, targetPort, capacity);
}
......
......@@ -15,14 +15,14 @@
*/
package teetime.framework.pipe;
import teetime.framework.AbstractInterThreadPipe;
import teetime.framework.AbstractSynchedPipe;
import teetime.framework.InputPort;
import teetime.framework.OutputPort;
import teetime.framework.StageState;
import teetime.framework.exceptionHandling.TerminateException;
import teetime.util.framework.concurrent.queue.ObservableSpScArrayQueue;
public class BoundedSynchedPipe<T> extends AbstractInterThreadPipe<T>implements IMonitorablePipe {
public class BoundedSynchedPipe<T> extends AbstractSynchedPipe<T>implements IMonitorablePipe {
// private static final Logger LOGGER = LoggerFactory.getLogger(SpScPipe.class);
......
......@@ -22,11 +22,11 @@ import org.jctools.queues.spec.ConcurrentQueueSpec;
import org.jctools.queues.spec.Ordering;
import org.jctools.queues.spec.Preference;
import teetime.framework.AbstractInterThreadPipe;
import teetime.framework.AbstractSynchedPipe;
import teetime.framework.InputPort;
import teetime.framework.OutputPort;
public final class UnboundedSynchedPipe<T> extends AbstractInterThreadPipe<T> {
public final class UnboundedSynchedPipe<T> extends AbstractSynchedPipe<T> {
private final Queue<Object> queue;
......
......@@ -15,11 +15,11 @@
*/
package teetime.framework.pipe;
import teetime.framework.AbstractIntraThreadPipe;
import teetime.framework.AbstractUnsynchedPipe;
import teetime.framework.InputPort;
import teetime.framework.OutputPort;
public final class UnsynchedPipe<T> extends AbstractIntraThreadPipe<T> {
public final class UnsynchedPipe<T> extends AbstractUnsynchedPipe<T> {
private Object element;
......
......@@ -23,7 +23,7 @@ import java.util.List;
import org.junit.Test;
import teetime.framework.AbstractInterThreadPipe;
import teetime.framework.AbstractSynchedPipe;
import teetime.framework.InputPort;
import teetime.framework.OutputPort;
import teetime.framework.signal.ISignal;
......@@ -41,7 +41,7 @@ public class BoundedSynchedPipeTest {
Merger<Object> portSource = new Merger<Object>();
OutputPort<Object> sourcePort = portSource.getOutputPort();
InputPort<Object> targetPort = portSource.getNewInputPort();
AbstractInterThreadPipe pipe = new BoundedSynchedPipe(sourcePort, targetPort, 1); // IPipe does not provide getSignal method
AbstractSynchedPipe pipe = new BoundedSynchedPipe(sourcePort, targetPort, 1); // IPipe does not provide getSignal method
List<ISignal> signals = new ArrayList<ISignal>();
signals.add(new StartingSignal());
......
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