Package io.debezium.storage.jdbc.offset
Class JdbcOffsetBackingStore
java.lang.Object
io.debezium.storage.jdbc.offset.JdbcOffsetBackingStore
- All Implemented Interfaces:
org.apache.kafka.connect.storage.OffsetBackingStore
public class JdbcOffsetBackingStore
extends Object
implements org.apache.kafka.connect.storage.OffsetBackingStore
Implementation of OffsetBackingStore that saves data to database table.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate JdbcOffsetBackingStoreConfigprivate Connectionprotected ConcurrentHashMap<String,String> protected ExecutorServiceprivate static final org.slf4j.Loggerprivate final AtomicInteger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(org.apache.kafka.connect.runtime.WorkerConfig config) connectorPartitions(String connectorName) fromByteBuffer(ByteBuffer data) get(Collection<ByteBuffer> keys) private voidprivate voidload()protected voidsave()set(Map<ByteBuffer, ByteBuffer> values, org.apache.kafka.connect.util.Callback<Void> callback) voidstart()voidstop()private voidtoByteBuffer(String data)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
config
-
data
-
executor
-
recordInsertSeq
-
conn
-
-
Constructor Details
-
JdbcOffsetBackingStore
public JdbcOffsetBackingStore()
-
-
Method Details
-
fromByteBuffer
-
toByteBuffer
-
configure
public void configure(org.apache.kafka.connect.runtime.WorkerConfig config) - Specified by:
configurein interfaceorg.apache.kafka.connect.storage.OffsetBackingStore
-
start
public void start()- Specified by:
startin interfaceorg.apache.kafka.connect.storage.OffsetBackingStore
-
initializeTable
- Throws:
SQLException
-
save
protected void save() -
load
private void load() -
stopExecutor
private void stopExecutor() -
stop
public void stop()- Specified by:
stopin interfaceorg.apache.kafka.connect.storage.OffsetBackingStore
-
set
public Future<Void> set(Map<ByteBuffer, ByteBuffer> values, org.apache.kafka.connect.util.Callback<Void> callback) - Specified by:
setin interfaceorg.apache.kafka.connect.storage.OffsetBackingStore
-
get
- Specified by:
getin interfaceorg.apache.kafka.connect.storage.OffsetBackingStore
-
connectorPartitions
- Specified by:
connectorPartitionsin interfaceorg.apache.kafka.connect.storage.OffsetBackingStore
-