类 JdbcOutputFormat<I,E extends JdbcBatchStatementExecutor<I>>
- java.lang.Object
-
- org.apache.seatunnel.connectors.seatunnel.jdbc.internal.JdbcOutputFormat<I,E>
-
- 所有已实现的接口:
Serializable
public class JdbcOutputFormat<I,E extends JdbcBatchStatementExecutor<I>> extends Object implements Serializable
A JDBC outputFormat- 另请参阅:
- 序列化表格
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static interfaceJdbcOutputFormat.StatementExecutorFactory<T extends JdbcBatchStatementExecutor<?>>A factory for creatingJdbcBatchStatementExecutorinstance.
-
字段概要
字段 修饰符和类型 字段 说明 protected JdbcConnectionProviderconnectionProvider
-
构造器概要
构造器 构造器 说明 JdbcOutputFormat(JdbcConnectionProvider connectionProvider, JdbcConnectionConfig jdbcConnectionConfig, JdbcOutputFormat.StatementExecutorFactory<E> statementExecutorFactory)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected voidaddToBatch(I record)protected voidattemptFlush()voidcheckFlushException()voidclose()Executes prepared statement and closes all resources of this instance.voidflush()voidopen()Connects to the target database and initializes the prepared statement.voidupdateExecutor(boolean reconnect)voidwriteRecord(I record)
-
-
-
字段详细资料
-
connectionProvider
protected final JdbcConnectionProvider connectionProvider
-
-
构造器详细资料
-
JdbcOutputFormat
public JdbcOutputFormat(JdbcConnectionProvider connectionProvider, JdbcConnectionConfig jdbcConnectionConfig, JdbcOutputFormat.StatementExecutorFactory<E> statementExecutorFactory)
-
-
方法详细资料
-
open
public void open() throws IOExceptionConnects to the target database and initializes the prepared statement.- 抛出:
IOException
-
checkFlushException
public void checkFlushException()
-
writeRecord
public final void writeRecord(I record)
-
addToBatch
protected void addToBatch(I record) throws SQLException
- 抛出:
SQLException
-
flush
public void flush() throws IOException- 抛出:
IOException
-
attemptFlush
protected void attemptFlush() throws SQLException- 抛出:
SQLException
-
close
public void close()
Executes prepared statement and closes all resources of this instance.
-
updateExecutor
public void updateExecutor(boolean reconnect) throws SQLException, ClassNotFoundException
-
-