/**
 * 
 */
package org.springblade.etl.connector.base.jdbc;

import org.springblade.etl.connector.base.SeatunnelConfig;

import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author wookvn
 *
 *         org.apache.seatunnel.connectors.seatunnel.jdbc.config.JdbcConnectionConfig
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class JdbcConnectionConfig extends SeatunnelConfig {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@JsonProperty(required = true)
	private String url;

	@JsonProperty(required = true)
	private String driver;

	private Integer connection_check_timeout_sec; // 默认30s

	private Integer max_retries; // 默认0

	private Integer batch_size = 3000; // 默认1000

	private Integer batch_interval_ms; // 多个批次间隔数量，默认1000ms

	private Integer max_commit_attempts; // 默认3

	private Integer transaction_timeout_sec; // 默认-1

	private Boolean auto_commit = true;

	@JsonProperty(value = "user", required = true)
	private String username;

	@JsonProperty(required = true)
	private String password;

	// Use Xa transactions to ensure exactly-once
	private Boolean is_exactly_once = false; // 是否exactly_once

}
