io.vertx.ext.sql

## Enum TransactionIsolation

- java.lang.Object
- - java.lang.Enum<TransactionIsolation>
  - - io.vertx.ext.sql.TransactionIsolation

- All Implemented Interfaces:
    Serializable, Comparable<TransactionIsolation>

      public enum TransactionIsolation
      extends Enum<TransactionIsolation>

  Represents a Transaction Isolation Level
  Author:
    Paulo Lopes

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `NONE` For engines that support it, none isolation means that each statement would essentially be its own transaction.
    `READ_COMMITTED` Specifies that shared locks are held while the data is being read to avoid dirty reads, but the data can be changed before the end of the transaction, resulting in nonrepeatable reads or phantom data.
    `READ_UNCOMMITTED` Implements dirty read, or isolation level 0 locking, which means that no shared locks are issued and no exclusive locks are honored.
    `REPEATABLE_READ` Locks are placed on all data that is used in a query, preventing other users from updating the data, but new phantom rows can be inserted into the data set by another user and are included in later reads in the current transaction.
    `SERIALIZABLE` Places a range lock on the data set, preventing other users from updating or inserting rows into the data set until the transaction is complete.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static TransactionIsolation` | `from(int level)`
    `static TransactionIsolation` | `from(String level)`
    `int` | `getType()`
    `static TransactionIsolation` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static TransactionIsolation[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### READ_UNCOMMITTED

          public static final TransactionIsolation READ_UNCOMMITTED

      Implements dirty read, or isolation level 0 locking, which means that no shared locks are issued and no exclusive locks are honored. When this option is set, it is possible to read uncommitted or dirty data; values in the data can be changed and rows can appear or disappear in the data set before the end of the transaction. This is the least restrictive of the four isolation levels.

    - #### READ_COMMITTED

          public static final TransactionIsolation READ_COMMITTED

      Specifies that shared locks are held while the data is being read to avoid dirty reads, but the data can be changed before the end of the transaction, resulting in nonrepeatable reads or phantom data.

    - #### REPEATABLE_READ

          public static final TransactionIsolation REPEATABLE_READ

      Locks are placed on all data that is used in a query, preventing other users from updating the data, but new phantom rows can be inserted into the data set by another user and are included in later reads in the current transaction. Because concurrency is lower than the default isolation level, use this option only when necessary.

    - #### SERIALIZABLE

          public static final TransactionIsolation SERIALIZABLE

      Places a range lock on the data set, preventing other users from updating or inserting rows into the data set until the transaction is complete. This is the most restrictive of the four isolation levels. Because concurrency is lower, use this option only when necessary.

    - #### NONE

          public static final TransactionIsolation NONE

      For engines that support it, none isolation means that each statement would essentially be its own transaction.

  - ### Method Detail

    - #### values

          public static TransactionIsolation[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (TransactionIsolation c : TransactionIsolation.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static TransactionIsolation valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### getType

          public int getType()

    - #### from

          public static TransactionIsolation from(int level)

    - #### from

          public static TransactionIsolation from(String level)

Copyright © 2017. All rights reserved.