org.apache.ignite.configuration

## Enum WALMode

- java.lang.Object
- - java.lang.Enum<WALMode>
  - - org.apache.ignite.configuration.WALMode

- All Implemented Interfaces:
    Serializable, Comparable<WALMode>

      public enum WALMode
      extends Enum<WALMode>

  WAL Mode. This enum defines crash recovery guarantees when Ignite persistence is enabled.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `BACKGROUND` Background mode.
    `DEFAULT` Deprecated. This mode is no longer default and left here only for API compatibility. It is equivalent to the `FSYNC` mode.
    `FSYNC` FSYNC mode: full-sync disk writes.
    `LOG_ONLY` Log only mode: flushes application buffers.
    `NONE` WAL is disabled.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static @Nullable WALMode` | `fromOrdinal(int ord)` Efficiently gets enumerated value from its ordinal.
    `static WALMode` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static WALMode[]` | `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

    - #### FSYNC

          public static final WALMode FSYNC

      FSYNC mode: full-sync disk writes. These writes survive power loss scenarios. When a control is returned from the transaction commit operation, the changes are guaranteed to be persisted to disk according to the transaction write synchronization mode.

    - #### LOG_ONLY

          public static final WALMode LOG_ONLY

      Log only mode: flushes application buffers. These writes survive process crash. When a control is returned from the transaction commit operation, the changes are guaranteed to be forced to the OS buffer cache. It's up to the OS to decide when to flush its caches to disk.

    - #### BACKGROUND

          public static final WALMode BACKGROUND

      Background mode. Does not force application's buffer flush. Last updates may be lost in case of a process crash.

    - #### NONE

          public static final WALMode NONE

      WAL is disabled. Data is guaranteed to be persisted on disk only in case of graceful cluster shutdown using `Ignite.active(boolean)` method. If an Ignite node is terminated in NONE mode abruptly, it is likely that the data stored on disk is corrupted and work directory will need to be cleared for a node restart.

    - #### DEFAULT

          @Deprecated
          public static final WALMode DEFAULT

      Deprecated. This mode is no longer default and left here only for API compatibility. It is equivalent to the `FSYNC` mode.
      Default mode: full-sync disk writes. These writes survive power loss scenarios. When a control is returned from the transaction commit operation, the changes are guaranteed to be persisted to disk according to the transaction write synchronization mode.

  - ### Method Detail

    - #### values

          public static WALMode[] 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 (WALMode c : WALMode.values())
              System.out.println(c);

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

    - #### valueOf

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

    - #### fromOrdinal

          @Nullable
          public static @Nullable WALMode fromOrdinal(int ord)

      Efficiently gets enumerated value from its ordinal.
      Parameters:
        `ord` - Ordinal value.
      Returns:
        Enumerated value or `null` if ordinal out of range.

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.10.0
Release Date | : March 10 2021