TransactionIsolationLevel 定义了5种隔离级别

如下,实现上是从java.sql.Connection中抄过来的

public enum TransactionIsolationLevel {
  NONE(Connection.TRANSACTION_NONE),
  READ_COMMITTED(Connection.TRANSACTION_READ_COMMITTED),
  READ_UNCOMMITTED(Connection.TRANSACTION_READ_UNCOMMITTED),
  REPEATABLE_READ(Connection.TRANSACTION_REPEATABLE_READ),
  SERIALIZABLE(Connection.TRANSACTION_SERIALIZABLE);


  private final int level;


  private TransactionIsolationLevel(int level) {
    this.level = level;
  }


  public int getLevel() {
    return level;
  }
}





xx

你可能感兴趣的:(TransactionIsolationLevel 定义了5种隔离级别)