public class KeyValueStore extends Object
SourceRecords that represent change events on rows. This store applies the
changes and maintains the current state of the rows.| Modifier and Type | Class and Description |
|---|---|
static class |
KeyValueStore.Collection |
| Modifier and Type | Field and Description |
|---|---|
private Map<io.debezium.relational.TableId,KeyValueStore.Collection> |
collectionsByTableId |
private List<org.apache.kafka.connect.source.SourceRecord> |
sourceRecords |
private Function<String,io.debezium.relational.TableId> |
tableIdFromTopic |
| Modifier | Constructor and Description |
|---|---|
protected |
KeyValueStore(Function<String,io.debezium.relational.TableId> tableIdFromTopic) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(org.apache.kafka.connect.source.SourceRecord record) |
KeyValueStore.Collection |
collection(String fullyQualifiedName) |
KeyValueStore.Collection |
collection(String catalog,
String tableName) |
KeyValueStore.Collection |
collection(io.debezium.relational.TableId tableId) |
int |
collectionCount() |
Set<io.debezium.relational.TableId> |
collections() |
static KeyValueStore |
createForTopicsBeginningWith(String prefix)
Create a KeyValueStore that removes from the topic names the supplied prefix to obtain the
TableId. |
static KeyValueStore |
createForTopicsMatching(String regex,
int groupNumber)
Create a KeyValueStore that uses the supplied regular expression and group number to extract the
TableId from
the topic name. |
Set<String> |
databases() |
protected static Function<String,io.debezium.relational.TableId> |
fromRegex(String regex,
int groupNumber) |
KeyValueStore.Collection |
getOrCreate(io.debezium.relational.TableId tableId) |
protected static org.apache.kafka.connect.data.Struct |
keyFor(org.apache.kafka.connect.source.SourceRecord record) |
protected static Function<String,io.debezium.relational.TableId> |
prefixedWith(String prefix) |
protected static org.apache.kafka.connect.data.Struct |
sourceFor(org.apache.kafka.connect.source.SourceRecord record) |
List<org.apache.kafka.connect.source.SourceRecord> |
sourceRecords() |
protected static org.apache.kafka.connect.data.Struct |
valueFor(org.apache.kafka.connect.source.SourceRecord record) |
private final List<org.apache.kafka.connect.source.SourceRecord> sourceRecords
private final Map<io.debezium.relational.TableId,KeyValueStore.Collection> collectionsByTableId
protected static Function<String,io.debezium.relational.TableId> prefixedWith(String prefix)
protected static Function<String,io.debezium.relational.TableId> fromRegex(String regex, int groupNumber)
public static KeyValueStore createForTopicsMatching(String regex, int groupNumber)
TableId from
the topic name.regex - the regular expression that identifies the table ID within the topic name; may not be nullgroupNumber - the group number in the regex for the table ID stringpublic static KeyValueStore createForTopicsBeginningWith(String prefix)
TableId.prefix - the prefix after which all of the topic name forms the table ID; may not be nullpublic void add(org.apache.kafka.connect.source.SourceRecord record)
public List<org.apache.kafka.connect.source.SourceRecord> sourceRecords()
public KeyValueStore.Collection collection(String fullyQualifiedName)
public KeyValueStore.Collection collection(String catalog, String tableName)
public KeyValueStore.Collection collection(io.debezium.relational.TableId tableId)
public Set<io.debezium.relational.TableId> collections()
public int collectionCount()
public KeyValueStore.Collection getOrCreate(io.debezium.relational.TableId tableId)
protected static org.apache.kafka.connect.data.Struct keyFor(org.apache.kafka.connect.source.SourceRecord record)
protected static org.apache.kafka.connect.data.Struct valueFor(org.apache.kafka.connect.source.SourceRecord record)
protected static org.apache.kafka.connect.data.Struct sourceFor(org.apache.kafka.connect.source.SourceRecord record)
Copyright © 2018 JBoss by Red Hat. All rights reserved.