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 StringCOLLECTION_NAME_KEYprivate CommonConnectorConfigconfigstatic StringDATABASE_NAME_KEYstatic StringDEBEZIUM_CONNECTOR_KEYstatic StringDEBEZIUM_VERSION_KEYstatic StringSCHEMA_NAME_KEYstatic StringSEQUENCE_KEYstatic StringSERVER_NAME_KEYstatic StringSNAPSHOT_KEYstatic StringTABLE_NAME_KEYstatic StringTIMESTAMP_KEY
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSourceInfo(CommonConnectorConfig config)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Stringdatabase()org.apache.kafka.connect.data.Schemaschema()Returns the schema of specific sub-types.protected Stringsequence()Returns extra sequencing metadata about a change event formatted as a stringified JSON array.protected StringserverName()protected abstract SnapshotRecordsnapshot()org.apache.kafka.connect.data.Structstruct()Returns thesourcestruct representing this source info.protected SourceInfoStructMaker<AbstractSourceInfo>structMaker()protected abstract Instanttimestamp()
-
-
-
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 thesourcestruct 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.
-
-