Interface JGroupsRaftReadCommandOptions
- All Superinterfaces:
JGroupsRaftCommandOptions
- All Known Implementing Classes:
JGroupsRaftReadCommandOptions.ReadImpl
public sealed interface JGroupsRaftReadCommandOptions
extends JGroupsRaftCommandOptions
permits JGroupsRaftReadCommandOptions.ReadImpl
Command options for read operations.
Extends the base command options with read-specific behavior such as linearizable consistency control. Read operations can choose between strong consistency (linearizable) or better performance (local reads).
- Since:
- 2.0
- Author:
- José Bolina
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface JGroupsRaftCommandOptions
JGroupsRaftCommandOptions.ReadBuilder, JGroupsRaftCommandOptions.WriteBuilder -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether this read operation should be linearizable.options()Creates a builder for read command options.Methods inherited from interface JGroupsRaftCommandOptions
ignoreReturnValue
-
Method Details
-
options
Creates a builder for read command options.- Returns:
- a new read options builder
-
linearizable
boolean linearizable()Whether this read operation should be linearizable.Linearizable reads go through the consensus protocol to ensure strong consistency but have higher latency. Non-linearizable reads are executed locally and may return stale data but offer better performance.
- Returns:
truefor linearizable reads,falsefor local reads
-