public class SpeedLimitStream extends AbstractStream implements StreamSubscriber
| Modifier and Type | Field and Description |
|---|---|
static long |
MAX_WAIT_TIME
maximum time to wait if SPEED is ORIGINAL
meaning that if there is a gap in the data longer than this, we continue)
|
log, name, outputDefinition, state, subscribers, ydb| Constructor and Description |
|---|
SpeedLimitStream(YarchDatabase dict,
String name,
TupleDefinition definition,
SpeedSpec speedSpec) |
| Modifier and Type | Method and Description |
|---|---|
void |
changeSpeed(SpeedSpec speedSpec) |
protected void |
doClose() |
void |
onTuple(Stream s,
Tuple t) |
void |
setSpeedSpec(SpeedSpec speedSpec) |
void |
setSubscribedStream(Stream s) |
void |
start()
Start emitting tuples.
|
void |
streamClosed(Stream stream)
Called when the subcribed stream is closed
we close this stream also.
|
String |
toString() |
addSubscriber, close, emitTuple, getColumnDefinition, getDefinition, getName, getNumEmittedTuples, getState, getSubscriberCount, getSubscribers, removeSubscriber, setNamepublic static final long MAX_WAIT_TIME
public SpeedLimitStream(YarchDatabase dict, String name, TupleDefinition definition, SpeedSpec speedSpec)
public void setSubscribedStream(Stream s)
public void start()
Streamstart in interface Streamstart in class AbstractStreampublic void onTuple(Stream s, Tuple t)
onTuple in interface StreamSubscriberpublic void streamClosed(Stream stream)
streamClosed in interface StreamSubscriberpublic void setSpeedSpec(SpeedSpec speedSpec)
public String toString()
toString in class AbstractStreamprotected void doClose()
doClose in class AbstractStreampublic void changeSpeed(SpeedSpec speedSpec)
Copyright © 2017 Space Applications Services. All rights reserved.