Package org.yamcs.yarch
Class Stream
java.lang.Object
org.yamcs.yarch.Stream
- Direct Known Subclasses:
HistogramReaderStream
,InternalStream
,LimitedStream
,MergeStream
,OutputStream
,SelectStream
,TableReaderStream
Streams are means to transport tuples.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected Log
protected String
protected TupleDefinition
static final int
static final int
static final int
protected AtomicInteger
protected final Collection<StreamSubscriber>
protected YarchDatabaseInstance
-
Constructor Summary
ModifierConstructorDescriptionprotected
Stream
(YarchDatabaseInstance ydb, String name, TupleDefinition definition) -
Method Summary
Modifier and TypeMethodDescriptionvoid
final void
close()
Closes the stream by changing the state, callingdoClose()
sand then sending the streamClosed signal to all subscribed clients.protected abstract void
doClose()
abstract void
doStart()
Start emitting tuples.void
void
getColumnDefinition
(String colName) long
getName()
int
getState()
int
boolean
isClosed()
protected boolean
protected boolean
quitting()
void
void
final void
start()
Start the stream by changing the state and callingdoStart()
toString()
-
Field Details
-
SETUP
public static final int SETUP- See Also:
-
RUNNING
public static final int RUNNING- See Also:
-
QUITTING
public static final int QUITTING- See Also:
-
name
-
outputDefinition
-
subscribers
-
state
-
log
-
ydb
-
-
Constructor Details
-
Stream
-
-
Method Details
-
doStart
public abstract void doStart()Start emitting tuples. -
getDefinition
-
emitTuple
-
getName
-
setName
-
addSubscriber
-
removeSubscriber
-
getColumnDefinition
-
start
public final void start()Start the stream by changing the state and callingdoStart()
If the stream is already started, do nothing.
-
isRunning
protected boolean isRunning() -
quitting
protected boolean quitting() -
close
public final void close()Closes the stream by changing the state, callingdoClose()
sand then sending the streamClosed signal to all subscribed clients.if the stream is already closed, do nothing.
-
doClose
protected abstract void doClose() -
getState
public int getState() -
isClosed
public boolean isClosed() -
getDataCount
public long getDataCount() -
getSubscriberCount
public int getSubscriberCount() -
getSubscribers
-
exceptionHandler
-
toString
-