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

added final to InputPort;

removed some unused/unnecessary methods
parent 33e68e47
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,6 @@ import org.jctools.queues.spec.ConcurrentQueueSpec;
import org.jctools.queues.spec.Ordering;
import org.jctools.queues.spec.Preference;
import teetime.framework.pipe.AbstractPipe;
import teetime.framework.signal.ISignal;
public abstract class AbstractInterThreadPipe extends AbstractPipe {
......
package teetime.framework;
import teetime.framework.pipe.AbstractPipe;
import teetime.framework.signal.ISignal;
public abstract class AbstractIntraThreadPipe extends AbstractPipe {
......
package teetime.framework.pipe;
package teetime.framework;
import teetime.framework.Stage;
import teetime.framework.InputPort;
import teetime.framework.OutputPort;
import teetime.framework.pipe.IPipe;
public abstract class AbstractPipe implements IPipe {
......
package teetime.framework;
import teetime.framework.pipe.IPipe;
public class InputPort<T> extends AbstractPort<T> {
public final class InputPort<T> extends AbstractPort<T> {
private final Stage owningStage;
......@@ -11,26 +9,13 @@ public class InputPort<T> extends AbstractPort<T> {
this.owningStage = owningStage;
}
public T receive() {
@SuppressWarnings("unchecked")
final T element = (T) this.pipe.removeLast();
return element;
}
public T read() {
@SuppressWarnings("unchecked")
final T element = (T) this.pipe.readLast();
return element;
}
/**
* Connects this input port with the given <code>pipe</code> bi-directionally
*
* @param pipe
* @return the next element from the connected pipe
*/
@Override
public void setPipe(final IPipe pipe) {
this.pipe = pipe;
@SuppressWarnings("unchecked")
public T receive() {
return (T) this.pipe.removeLast();
}
public Stage getOwningStage() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment