T - public class UnmodifiableBuffer<T> extends Object implements IBuffer<T>
| Constructor and Description |
|---|
UnmodifiableBuffer(IBuffer<?> buf,
List<T> records) |
UnmodifiableBuffer(IBuffer<T> buf) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the buffer
|
void |
consumeRecord(T record,
int recordBytes,
String sequenceNumber)
Stores the record in the buffer
|
boolean |
equals(Object obj) |
long |
getBytesToBuffer()
Get the byte size limit of data stored in the buffer before the records are flushed to the
emitter
|
String |
getFirstSequenceNumber()
Get the sequence number of the first record stored in the buffer.
|
String |
getLastSequenceNumber()
Get the sequence number of the last record stored in the buffer.
|
long |
getMillisecondsToBuffer()
Get the time limit in milliseconds before the records are flushed to the emitter
|
long |
getNumRecordsToBuffer()
Get the record number limit of data stored in the buffer before the records are flushed to
the emitter
|
List<T> |
getRecords()
Get the records stored in the buffer
|
int |
hashCode() |
boolean |
shouldFlush()
Returns true if the buffer is full and stored records should be sent to the emitter
|
public long getBytesToBuffer()
IBuffergetBytesToBuffer in interface IBuffer<T>public long getNumRecordsToBuffer()
IBuffergetNumRecordsToBuffer in interface IBuffer<T>public long getMillisecondsToBuffer()
IBuffergetMillisecondsToBuffer in interface IBuffer<T>public boolean shouldFlush()
IBuffershouldFlush in interface IBuffer<T>public void consumeRecord(T record, int recordBytes, String sequenceNumber)
IBufferconsumeRecord in interface IBuffer<T>record - record to be processedrecordBytes - size of the record data in bytessequenceNumber - Amazon Kinesis sequence identifierpublic void clear()
IBufferpublic String getFirstSequenceNumber()
IBuffergetFirstSequenceNumber in interface IBuffer<T>public String getLastSequenceNumber()
IBuffergetLastSequenceNumber in interface IBuffer<T>public List<T> getRecords()
IBuffergetRecords in interface IBuffer<T>Copyright © 2016. All rights reserved.