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
-
Nested Class Summary
Nested classes/interfaces inherited from interface JGroupsRaftCommandOptions
JGroupsRaftCommandOptions.ReadBuilder, JGroupsRaftCommandOptions.WriteBuilderNested classes/interfaces inherited from interface JGroupsRaftReadCommandOptions
JGroupsRaftReadCommandOptions.ReadImpl -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleanWhether to ignore the return value of the command execution.booleanWhether this read operation should be linearizable.
-
Field Details
-
SERIALIZER
-
-
Method Details
-
linearizable
public boolean linearizable()Description copied from interface:JGroupsRaftReadCommandOptionsWhether 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:
linearizablein interfaceJGroupsRaftReadCommandOptions- Returns:
truefor linearizable reads,falsefor local reads
-
ignoreReturnValue
public boolean ignoreReturnValue()Description copied from interface:JGroupsRaftCommandOptionsWhether 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:
ignoreReturnValuein interfaceJGroupsRaftCommandOptions- Returns:
trueif return value should be ignored,falseotherwise
-
equals
-
hashCode
-