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:
  • 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:
      true if return value should be ignored, false otherwise
    • 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