Interface JGroupsRaftCommandOptions
- All Known Subinterfaces:
JGroupsRaftReadCommandOptions, JGroupsRaftWriteCommandOptions
- All Known Implementing Classes:
JGroupsRaftReadCommandOptions.ReadImpl, JGroupsRaftWriteCommandOptions.WriteImpl
public sealed interface JGroupsRaftCommandOptions
permits JGroupsRaftReadCommandOptions, JGroupsRaftWriteCommandOptions
Customizes how commands behave during execution.
This interface provides options to modify command execution behavior on a per-invocation basis. Different options are available for read and write operations to optimize performance and consistency based on application requirements.
Common options include:
- Ignore return value: Avoids serializing and returning response data, improving performance when results are not needed
- Linearizable reads: Controls whether read operations require consensus or can be executed locally with potential stale data
- Since:
- 2.0
- Author:
- José Bolina
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classBuilder for read command options.static final classBuilder for write command options. -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether to ignore the return value of the command execution.Creates a builder for read command options.Creates a builder for write command options.
-
Method Details
-
ignoreReturnValue
boolean ignoreReturnValue()Whether to ignore the return value of the command execution.When
true, the response will not be serialized and returned to the caller, which can improve performance for fire-and-forget operations.- Returns:
trueif return value should be ignored,falseotherwise
-
readOptions
Creates a builder for read command options.- Returns:
- a new read options builder
-
writeOptions
Creates a builder for write command options.- Returns:
- a new write options builder
-