Package io.debezium.connector
Class AbstractSourceInfo
- java.lang.Object
-
- io.debezium.connector.AbstractSourceInfo
-
- Direct Known Subclasses:
BaseSourceInfo
public abstract class AbstractSourceInfo extends Object
Common information provided by all connectors in either source field or offsets- Author:
- Jiri Pechanec
-
-
Field Summary
Fields Modifier and Type Field Description static String
COLLECTION_NAME_KEY
private CommonConnectorConfig
config
static String
DATABASE_NAME_KEY
static String
DEBEZIUM_CONNECTOR_KEY
static String
DEBEZIUM_VERSION_KEY
static String
SCHEMA_NAME_KEY
static String
SEQUENCE_KEY
static String
SERVER_NAME_KEY
static String
SNAPSHOT_KEY
static String
TABLE_NAME_KEY
static String
TIMESTAMP_KEY
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSourceInfo(CommonConnectorConfig config)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract String
database()
org.apache.kafka.connect.data.Schema
schema()
Returns the schema of specific sub-types.protected String
sequence()
Returns extra sequencing metadata about a change event formatted as a stringified JSON array.protected String
serverName()
protected abstract SnapshotRecord
snapshot()
org.apache.kafka.connect.data.Struct
struct()
Returns thesource
struct representing this source info.protected SourceInfoStructMaker<AbstractSourceInfo>
structMaker()
protected abstract Instant
timestamp()
-
-
-
Field Detail
-
DEBEZIUM_VERSION_KEY
public static final String DEBEZIUM_VERSION_KEY
- See Also:
- Constant Field Values
-
DEBEZIUM_CONNECTOR_KEY
public static final String DEBEZIUM_CONNECTOR_KEY
- See Also:
- Constant Field Values
-
SERVER_NAME_KEY
public static final String SERVER_NAME_KEY
- See Also:
- Constant Field Values
-
TIMESTAMP_KEY
public static final String TIMESTAMP_KEY
- See Also:
- Constant Field Values
-
SNAPSHOT_KEY
public static final String SNAPSHOT_KEY
- See Also:
- Constant Field Values
-
DATABASE_NAME_KEY
public static final String DATABASE_NAME_KEY
- See Also:
- Constant Field Values
-
SCHEMA_NAME_KEY
public static final String SCHEMA_NAME_KEY
- See Also:
- Constant Field Values
-
TABLE_NAME_KEY
public static final String TABLE_NAME_KEY
- See Also:
- Constant Field Values
-
COLLECTION_NAME_KEY
public static final String COLLECTION_NAME_KEY
- See Also:
- Constant Field Values
-
SEQUENCE_KEY
public static final String SEQUENCE_KEY
- See Also:
- Constant Field Values
-
config
private final CommonConnectorConfig config
-
-
Constructor Detail
-
AbstractSourceInfo
protected AbstractSourceInfo(CommonConnectorConfig config)
-
-
Method Detail
-
schema
public org.apache.kafka.connect.data.Schema schema()
Returns the schema of specific sub-types. Implementations should call#schemaBuilder()
to add all shared fields to their schema.
-
structMaker
protected SourceInfoStructMaker<AbstractSourceInfo> structMaker()
-
timestamp
protected abstract Instant timestamp()
- Returns:
- timestamp of the event
-
snapshot
protected abstract SnapshotRecord snapshot()
- Returns:
- status whether the record is from snapshot or streaming phase
-
database
protected abstract String database()
- Returns:
- name of the database
-
serverName
protected String serverName()
- Returns:
- logical name of the server
-
struct
public org.apache.kafka.connect.data.Struct struct()
Returns thesource
struct representing this source info.
-
sequence
protected String sequence()
Returns extra sequencing metadata about a change event formatted as a stringified JSON array. The metadata contained in a sequence must be ordered sequentially in order to be understood and compared. Note: if a source's sequence metadata contains any string values, those strings must be correctly escaped before being included in the stringified JSON array.
-
-