public abstract class StreamBaseClient.TupleBuffer extends Object
Modifier and Type | Field and Description |
---|---|
(package private) int |
bufferTupleCount
Number of tuples in buffer
|
Constructor and Description |
---|
TupleBuffer(StreamProperties props)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addToBuffer(Tuple tuple,
int id)
Add to buffer
|
(package private) boolean |
addTuple(Tuple tuple)
Add a tuple
|
(package private) boolean |
addTuples(Collection<Tuple> tuples)
Add tuples
|
boolean |
canDequeue(StreamProperties props)
Can dequeue?
|
boolean |
canEnqueue(StreamProperties props)
Can enqueue?
|
protected void |
checkTuple(Tuple tuple)
Check tuple to make sure it is up to snuff
|
(package private) abstract void |
enqueue(boolean hasMore)
actually enqueue the buffer
|
boolean |
equals(Object obj) |
int |
hashCode() |
(package private) abstract long |
numBytes()
Number of bytes in buffer
|
StreamProperties |
props()
get stream properties for this Buffer
|
(package private) void |
recycle()
Clear the TupleBuffer
|
int |
tupleCount()
Get tuple count
|
TupleBuffer(StreamProperties props)
props
- Propertiesboolean addTuple(Tuple tuple) throws StreamBaseException
tuple
- Tuple to addStreamBaseException
- Error adding tupleboolean addTuples(Collection<Tuple> tuples) throws StreamBaseException
tuples
- Tuples to addStreamBaseException
- Error adding tuplesprotected abstract void addToBuffer(Tuple tuple, int id) throws TupleException
tuple
- Tuple to addid
- IdentifierTupleException
- Error adding to bufferabstract long numBytes()
void recycle()
abstract void enqueue(boolean hasMore) throws StreamBaseException
hasMore
- are there more Tuples in this batch of tuplesStreamBaseException
public StreamProperties props()
protected void checkTuple(Tuple tuple)
tuple
- public int tupleCount()
public boolean canEnqueue(StreamProperties props)
props
- Propertiespublic boolean canDequeue(StreamProperties props)
props
- PropertiesCopyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.