Package net.nuke24.tscript34.p0010.ducer
Class InputPortState<I>
java.lang.Object
net.nuke24.tscript34.p0010.ducer.InputPortState<I>
Represents the state of a Danducer input port,
which can be open or closed, and have some
queued but not-processed data.
If closed, the queued data will *never* be processed
by the Danducer in question.
Counterpart to a DucerChunk,
which can be thought to represent the state of an output port.
2024-02-09 Note: This is a bad way to model this because
the case where input is NOT closed, but there is data queued,
is hard to handle, especially in an abstract way.
When updating a DucerState, one would need to be careful to always process
any queued data before processing new data.
If input data is only ever completely rejected
(as opposed to rejected only for now),
this problem goes away. The earlier Ducer scheme
was in this way better than the current one.
It is probably best to remove the idea of queued input data entirely.
That said, we could have an auxiliary output pipe, whose chunks
are the same type as input chunks, and use that as a way
to pass on unprocessed input.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
isClosed
public final boolean isClosedWhether the port is closed. Once closed, anything left in the queue can be safely discarded or passed to a different port. -
queued
-
-
Constructor Details
-
InputPortState
-
-
Method Details
-
isClosed
public boolean isClosed()
-