Enum SqlJetSafetyLevel

java.lang.Object
java.lang.Enum<SqlJetSafetyLevel>
org.tmatesoft.sqljet.core.internal.SqlJetSafetyLevel
All Implemented Interfaces:
Serializable, Comparable<SqlJetSafetyLevel>, java.lang.constant.Constable

public enum SqlJetSafetyLevel extends Enum<SqlJetSafetyLevel>
Valuest to adjust the robustness of the database to damage due to OS crashes or power failures by changing the number of syncs()s when writing the rollback journal.
  • Enum Constant Details

    • OFF

      public static final SqlJetSafetyLevel OFF
      sqlite3OsSync() is never called. This is the default for temporary and transient files.
    • NORMAL

      public static final SqlJetSafetyLevel NORMAL
      The journal is synced once before writes begin on the database. This is normally adequate protection, but it is theoretically possible, though very unlikely, that an inopertune power failure could leave the journal in a state which would cause damage to the database when it is rolled back.
    • FULL

      public static final SqlJetSafetyLevel FULL
      The journal is synced twice before writes begin on the database (with some additional information - the nRec field of the journal header - being written in between the two syncs). If we assume that writing a single disk sector is atomic, then this mode provides assurance that the journal will not be corrupted to the point of causing damage to the database during rollback.
  • Method Details

    • values

      public static SqlJetSafetyLevel[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static SqlJetSafetyLevel 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