Class JGroupsRaftCommandOptions.ReadBuilder

java.lang.Object
org.jgroups.raft.command.JGroupsRaftCommandOptions.ReadBuilder
Enclosing interface:
JGroupsRaftCommandOptions

public static final class JGroupsRaftCommandOptions.ReadBuilder extends Object
Builder for read command options.
Since:
2.0
Author:
José Bolina
  • Constructor Details

    • ReadBuilder

      public ReadBuilder()
  • Method Details

    • ignoreReturnValue

      public JGroupsRaftCommandOptions.ReadBuilder ignoreReturnValue(boolean ignore)
      Sets whether to ignore the return value of the read operation.
      Parameters:
      ignore - true to ignore return values, false otherwise
      Returns:
      this builder
    • linearizable

      public JGroupsRaftCommandOptions.ReadBuilder linearizable(boolean linearizable)
      Sets whether the read operation should be linearizable.

      When true, the read goes through the consensus protocol ensuring linearizable consistency. When false, the read is executed locally and may return stale data but with better performance.

      Parameters:
      linearizable - true for linearizable reads, false for local reads
      Returns:
      this builder
    • build

      Builds the read command options.
      Returns:
      the configured read options