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
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 Summary
Enum ConstantsEnum ConstantDescriptionForces the WAL after every append (and whenever the writer wakes up without new work).Leaves frames queued untilValueStore.awaitWalDurable(long)(invoked during NativeStore commit) requests a force.Flushes buffered frames to the WAL file whenever the configuredValueStoreWalConfig.syncInterval()elapses without new work but never callsFileChannel.force. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this type with the specified name.static ValueStoreWalConfig.SyncPolicy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
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 runningFileChannel.forcefor every minted value. -
INTERVAL
Flushes buffered frames to the WAL file whenever the configuredValueStoreWalConfig.syncInterval()elapses without new work but never callsFileChannel.force. EvenValueStore.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
Leaves frames queued untilValueStore.awaitWalDurable(long)(invoked during NativeStore commit) requests a force. This keeps ingestion fast during a transaction but issuesFileChannel.forcewhen the transaction commits, providing durability at commit boundaries only.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-