Package org.apache.kafka.connect.source
Enum Class SourceTask.TransactionBoundary
java.lang.Object
java.lang.Enum<SourceTask.TransactionBoundary>
org.apache.kafka.connect.source.SourceTask.TransactionBoundary
- All Implemented Interfaces:
Serializable
,Comparable<SourceTask.TransactionBoundary>
,Constable
- Enclosing class:
- SourceTask
Represents the permitted values for the
SourceTask.TRANSACTION_BOUNDARY_CONFIG
property.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionTransactions will be defined by the connector itself, via aTransactionContext
.Transactions will be started and committed on a user-defined time interval.A new transaction will be started and committed for every batch of records returned bySourceTask.poll()
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final SourceTask.TransactionBoundary
The default transaction boundary style that will be used for source connectors when no style is explicitly configured. -
Method Summary
Modifier and TypeMethodDescriptionfromProperty
(String property) Parse aSourceTask.TransactionBoundary
from the given string.toString()
Returns the enum constant of this class with the specified name.static SourceTask.TransactionBoundary[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
POLL
A new transaction will be started and committed for every batch of records returned bySourceTask.poll()
. -
INTERVAL
Transactions will be started and committed on a user-defined time interval. -
CONNECTOR
Transactions will be defined by the connector itself, via aTransactionContext
.
-
-
Field Details
-
DEFAULT
The default transaction boundary style that will be used for source connectors when no style is explicitly configured.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
fromProperty
Parse aSourceTask.TransactionBoundary
from the given string.- Parameters:
property
- the string to parse; should not be null- Returns:
- the
SourceTask.TransactionBoundary
whose name matches the given string - Throws:
IllegalArgumentException
- if there is no transaction boundary type with the given name
-
toString
- Overrides:
toString
in classEnum<SourceTask.TransactionBoundary>
-