Package org.yamcs.yarch
Class TableReaderStream
- java.lang.Object
-
- org.yamcs.yarch.Stream
-
- org.yamcs.yarch.TableReaderStream
-
- All Implemented Interfaces:
Runnable
,TableVisitor
public class TableReaderStream extends Stream implements Runnable, TableVisitor
Implements skeleton for table streamer that uses PartitionManager to handle partitioning.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.yamcs.yarch.Stream
Stream.ExceptionHandler
-
Nested classes/interfaces inherited from interface org.yamcs.yarch.TableVisitor
TableVisitor.Action, TableVisitor.ActionType
-
-
Field Summary
Fields Modifier and Type Field Description protected TableDefinition
tableDefinition
-
Fields inherited from class org.yamcs.yarch.Stream
log, name, outputDefinition, QUITTING, RUNNING, SETUP, state, subscribers, ydb
-
Fields inherited from interface org.yamcs.yarch.TableVisitor
ACTION_CONTINUE, ACTION_DELETE, ACTION_DELETE_STOP, ACTION_STOP, ACTION_UPDATE, ACTION_UPDATE_STOP
-
-
Constructor Summary
Constructors Constructor Description TableReaderStream(YarchDatabaseInstance ydb, TableDefinition tblDef, TableWalker iterator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
compare(byte[] a1, byte[] a2)
protected Tuple
dataToTuple(byte[] k, byte[] v)
void
doClose()
void
doStart()
Start emitting tuples.TableDefinition
getTableDefinition()
void
run()
TableVisitor.Action
visit(byte[] key, byte[] value)
-
Methods inherited from class org.yamcs.yarch.Stream
addSubscriber, close, emitTuple, exceptionHandler, getColumnDefinition, getDataCount, getDefinition, getName, getState, getSubscriberCount, getSubscribers, isClosed, isRunning, quitting, removeSubscriber, setName, start, toString
-
-
-
-
Field Detail
-
tableDefinition
protected TableDefinition tableDefinition
-
-
Constructor Detail
-
TableReaderStream
public TableReaderStream(YarchDatabaseInstance ydb, TableDefinition tblDef, TableWalker iterator)
-
-
Method Detail
-
doStart
public void doStart()
Description copied from class:Stream
Start emitting tuples.
-
visit
public TableVisitor.Action visit(byte[] key, byte[] value)
- Specified by:
visit
in interfaceTableVisitor
-
dataToTuple
protected Tuple dataToTuple(byte[] k, byte[] v)
-
getTableDefinition
public TableDefinition getTableDefinition()
-
compare
protected int compare(byte[] a1, byte[] a2)
-
-