Package io.debezium.connector.jdbc
Interface Buffer
- All Known Implementing Classes:
RecordBuffer,ReducedRecordBuffer
public interface Buffer
An interface for implementing several kind of buffers
- Author:
- Gaurav Miglani
-
Method Summary
Modifier and TypeMethodDescriptionadd(SinkRecordDescriptor recordDescriptor) to add aSinkRecordDescriptorto the internal buffer and call theflush()when buffer size >=JdbcSinkConnectorConfig.getBatchSize()flush()to clear and flush the internal bufferbooleanisEmpty()to check whether buffer is empty or not.
-
Method Details
-
add
to add aSinkRecordDescriptorto the internal buffer and call theflush()when buffer size >=JdbcSinkConnectorConfig.getBatchSize()- Parameters:
recordDescriptor- the Sink record descriptor- Returns:
- the buffer records
-
flush
List<SinkRecordDescriptor> flush()to clear and flush the internal buffer- Returns:
SinkRecordDescriptorthe flushed buffer records.
-
isEmpty
boolean isEmpty()to check whether buffer is empty or not.- Returns:
- true if empty else false.
-