public class StreamBaseClient.SerializedTupleBuffer extends StreamBaseClient.TupleBuffer
bufferTupleCount
Constructor and Description |
---|
SerializedTupleBuffer(StreamProperties props)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
addToBuffer(Tuple tuple,
int id)
Possibly add a tuple if there is room
|
(package private) void |
enqueue(boolean hasMore)
actually enqueue the buffer
|
ByteBuffer |
getBuffer()
Return a ByteBuffer containing all of the tuples ready to be serialized
also contains empty space at the beginning of the buffer for a network
header
|
(package private) long |
numBytes()
Number of bytes in buffer
|
(package private) void |
recycle()
clear the buffer
|
addTuple, addTuples, canDequeue, canEnqueue, checkTuple, equals, hashCode, props, tupleCount
SerializedTupleBuffer(StreamProperties props) throws StreamBaseException
props
- PropertiesStreamBaseException
- Error creating bufferprotected void addToBuffer(Tuple tuple, int id) throws TupleException
addToBuffer
in class StreamBaseClient.TupleBuffer
tuple
- id
- TupleException
- Error adding to bufferpublic ByteBuffer getBuffer()
void recycle()
recycle
in class StreamBaseClient.TupleBuffer
void enqueue(boolean hasMore) throws StreamBaseException
StreamBaseClient.TupleBuffer
enqueue
in class StreamBaseClient.TupleBuffer
hasMore
- are there more Tuples in this batch of tuplesStreamBaseException
long numBytes()
StreamBaseClient.TupleBuffer
numBytes
in class StreamBaseClient.TupleBuffer
Copyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.