Enum ValueStoreWalConfig.SyncPolicy

java.lang.Object
java.lang.Enum<ValueStoreWalConfig.SyncPolicy>
org.eclipse.rdf4j.sail.nativerdf.wal.ValueStoreWalConfig.SyncPolicy
All Implemented Interfaces:
Serializable, Comparable<ValueStoreWalConfig.SyncPolicy>
Enclosing class:
ValueStoreWalConfig

public static enum ValueStoreWalConfig.SyncPolicy extends Enum<ValueStoreWalConfig.SyncPolicy>
Controls when the WAL writer flushes buffered frames to disk and when it invokes FileChannel.force(boolean) to guarantee durability. Choose the policy that matches the desired durability vs. throughput trade-off.
  • Enum Constant Details

    • ALWAYS

      public static final ValueStoreWalConfig.SyncPolicy ALWAYS
      Forces the WAL after every append (and whenever the writer wakes up without new work). This delivers the strongest durability and detects deleted segments immediately, at the cost of running FileChannel.force for every minted value.
    • INTERVAL

      public static final ValueStoreWalConfig.SyncPolicy INTERVAL
      Flushes buffered frames to the WAL file whenever the configured ValueStoreWalConfig.syncInterval() elapses without new work but never calls FileChannel.force. Even ValueStore.awaitWalDurable(long) only waits for frames to leave the in-memory queue, so crashes can drop recently minted values. Choose this for maximum throughput with best-effort persistence.
    • COMMIT

      public static final ValueStoreWalConfig.SyncPolicy COMMIT
      Leaves frames queued until ValueStore.awaitWalDurable(long) (invoked during NativeStore commit) requests a force. This keeps ingestion fast during a transaction but issues FileChannel.force when the transaction commits, providing durability at commit boundaries only.
  • Method Details

    • values

      public static ValueStoreWalConfig.SyncPolicy[] 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 ValueStoreWalConfig.SyncPolicy 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