/*
 * Copyright (c) 京北方信息技术股份有限公司 Corporation 2021 . All rights reserved.
 *
 */
package net.northking.cctp.common.db.mode;

/**
 * 数据源配置项
 *
 * @author : xiusong.xie
 * @version : 1.0
 */
public class DataSourceConfig
{
  private String name;
  /**
   * Fully qualified name of the JDBC driver. Auto-detected based on the URL by default.
   */
  private String driverClassName;

  /**
   * JDBC URL of the database.
   */
  private String url;

  /**
   * Login username of the database.
   */
  private String username;

  /**
   * Login password of the database.
   */
  private String password;

  /**
   * 是否只读
   */
  private boolean isReadOnly = false;
  /**
   * 连接池名称
   */
  private String poolName;
  /**
   * 连接池最大连接数
   */
  private volatile int maxPoolSize = 3;
  /**
   * 连接池最小空闲数
   */
  private volatile int minIdle = 2;
  /**
   * 自动提交
   */
  private boolean isAutoCommit = true;

  public String getName()
  {
    return name;
  }

  public void setName(String name)
  {
    this.name = name;
  }

  public String getDriverClassName()
  {
    return driverClassName;
  }

  public void setDriverClassName(String driverClassName)
  {
    this.driverClassName = driverClassName;
  }

  public String getUrl()
  {
    return url;
  }

  public void setUrl(String url)
  {
    this.url = url;
  }

  public String getUsername()
  {
    return username;
  }

  public void setUsername(String username)
  {
    this.username = username;
  }

  public String getPassword()
  {
    return password;
  }

  public void setPassword(String password)
  {
    this.password = password;
  }

  public boolean isReadOnly()
  {
    return isReadOnly;
  }

  public void setReadOnly(boolean readOnly)
  {
    isReadOnly = readOnly;
  }

  public String getPoolName()
  {
    return poolName;
  }

  public void setPoolName(String poolName)
  {
    this.poolName = poolName;
  }

  public int getMaxPoolSize()
  {
    return maxPoolSize;
  }

  public void setMaxPoolSize(int maxPoolSize)
  {
    this.maxPoolSize = maxPoolSize;
  }

  public int getMinIdle()
  {
    return minIdle;
  }

  public void setMinIdle(int minIdle)
  {
    this.minIdle = minIdle;
  }

  public boolean isAutoCommit()
  {
    return isAutoCommit;
  }

  public void setAutoCommit(boolean autoCommit)
  {
    this.isAutoCommit = autoCommit;
  }

}
