Enum SyncMode

java.lang.Object
java.lang.Enum<SyncMode>
org.redisson.api.SyncMode
All Implemented Interfaces:
Serializable, Comparable<SyncMode>

public enum SyncMode extends Enum<SyncMode>
Defines the synchronization modes used for replication with Valkey or Redis replica instances.
Author:
Nikita Koksharov
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Ensures data durability by blocking until replica instances acknowledge that write operations have been applied to memory.
    Ensures data durability by blocking until write operations are confirmed as persisted to the Append-Only File (AOF) on the primary Redis instance and replicas.
    Ensures data durability by blocking until write operations are confirmed as persisted to the memory and the Append-Only File (AOF) on the primary Redis instance and replicas if the AOF persistence feature is enabled.
  • Method Summary

    Modifier and Type
    Method
    Description
    static SyncMode
    Returns the enum constant of this type with the specified name.
    static SyncMode[]
    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 Details

    • AUTO

      public static final SyncMode AUTO
      Ensures data durability by blocking until write operations are confirmed as persisted to the memory and the Append-Only File (AOF) on the primary Redis instance and replicas if the AOF persistence feature is enabled. If AOF persistence is unavailable, falls back to blocking until replica instances acknowledge that write operations have been applied to memory. If neither durability mechanism is available, proceeds without synchronization guarantees.
    • ACK

      public static final SyncMode ACK
      Ensures data durability by blocking until replica instances acknowledge that write operations have been applied to memory.
    • ACK_AOF

      public static final SyncMode ACK_AOF
      Ensures data durability by blocking until write operations are confirmed as persisted to the Append-Only File (AOF) on the primary Redis instance and replicas.

      NOTE: Redis 7.2.0+ or any Valkey version is required

  • Method Details

    • values

      public static SyncMode[] 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 SyncMode 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