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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Logprotected Stringprotected TupleDefinitionstatic final intstatic final intstatic final intprotected AtomicIntegerprotected final Collection<StreamSubscriber>protected YarchDatabaseInstance -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStream(YarchDatabaseInstance ydb, String name, TupleDefinition definition) -
Method Summary
Modifier and TypeMethodDescriptionvoidfinal voidclose()Closes the stream by changing the state, callingdoClose()sand then sending the streamClosed signal to all subscribed clients.protected abstract voiddoClose()abstract voiddoStart()Start emitting tuples.voidvoidgetColumnDefinition(String colName) longgetName()intgetState()intbooleanisClosed()protected booleanprotected booleanquitting()voidvoidfinal voidstart()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
-