public interface Dequeuer
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_TIMEOUT
The default timeout value: 3
|
static java.util.concurrent.TimeUnit |
DEFAULT_TIMEOUT_UNIT
The default timeout units:
TimeUnit.SECONDS |
Modifier and Type | Method and Description |
---|---|
java.util.List<Tuple> |
dequeue(int numTuples)
Try to dequeue tuples with the
Dequeuer.DEFAULT_TIMEOUT and Dequeuer.DEFAULT_TIMEOUT_UNIT
if numTuples == 0 will return immediately
if numTuples < 0 will wait the maximum timeout before returning
|
java.util.List<Tuple> |
dequeue(int numTuples,
long timeout,
java.util.concurrent.TimeUnit timeUnit)
Try to dequeue tuples within a provided timeout.
|
void |
drain()
Drain any tuples that are currently in flight in the server.
|
Schema |
getSchema()
|
StreamProperties |
getStreamProperties()
Get the
StreamProperties for the associated stream. |
static final long DEFAULT_TIMEOUT
static final java.util.concurrent.TimeUnit DEFAULT_TIMEOUT_UNIT
TimeUnit.SECONDS
StreamProperties getStreamProperties()
StreamProperties
for the associated stream.Schema getSchema()
java.util.List<Tuple> dequeue(int numTuples) throws StreamBaseException
Dequeuer.DEFAULT_TIMEOUT
and Dequeuer.DEFAULT_TIMEOUT_UNIT
numTuples
- the number of tuples to dequeueStreamBaseException
java.util.List<Tuple> dequeue(int numTuples, long timeout, java.util.concurrent.TimeUnit timeUnit) throws StreamBaseException
numTuples
- the number of tuples to dequeuetimeout
- the maximum time to waittimeUnit
- the time unit of timeout argumentStreamBaseException
void drain() throws StreamBaseException
StreamBaseException