Class JGroupsRaftReadCommandOptions.ReadImpl

java.lang.Object
org.jgroups.raft.command.JGroupsRaftReadCommandOptions.ReadImpl
All Implemented Interfaces:
JGroupsRaftCommandOptions, JGroupsRaftReadCommandOptions
Enclosing interface:
JGroupsRaftReadCommandOptions

public static final class JGroupsRaftReadCommandOptions.ReadImpl extends Object implements JGroupsRaftReadCommandOptions
Since:
2.0
Author:
José Bolina
  • Field Details

  • Method Details

    • linearizable

      public boolean linearizable()
      Description copied from interface: JGroupsRaftReadCommandOptions
      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.

      Specified by:
      linearizable in interface JGroupsRaftReadCommandOptions
      Returns:
      true for linearizable reads, false for local reads
    • ignoreReturnValue

      public boolean ignoreReturnValue()
      Description copied from interface: JGroupsRaftCommandOptions
      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.

      Specified by:
      ignoreReturnValue in interface JGroupsRaftCommandOptions
      Returns:
      true if return value should be ignored, false otherwise
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object