Enum DatabaseOptions.TransactionIsolation

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      SERIALIZABLE
      Serializable transactions provides the highest level of isolation between transactions by acquiring an exclusive lock at the beginning of a transaction.
      SNAPSHOT
      Snapsot isolation is when each transaction reads from a snapshot of the database when the transaction started.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static DatabaseOptions.TransactionIsolation valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static DatabaseOptions.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

      • SNAPSHOT

        public static final DatabaseOptions.TransactionIsolation SNAPSHOT
        Snapsot isolation is when each transaction reads from a snapshot of the database when the transaction started. This isolation level provides highest throughput by allowing concurrent transactions to continue. But at commit time, the changes made in a transaction are applied to the latest version of the database contents which might have changed after the transaction started.
      • SERIALIZABLE

        public static final DatabaseOptions.TransactionIsolation SERIALIZABLE
        Serializable transactions provides the highest level of isolation between transactions by acquiring an exclusive lock at the beginning of a transaction. Therefore, any value read in a transaction is guaranteed to hold at commit time as well. Exclusive locks reduce the throughput of concurrent write transactions.
    • Method Detail

      • values

        public static DatabaseOptions.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 (DatabaseOptions.TransactionIsolation c : DatabaseOptions.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 DatabaseOptions.TransactionIsolation valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null