Package com.couchbase.client.java.kv
Class GetReplicaStrategy.FromIndex
java.lang.Object
com.couchbase.client.java.kv.GetReplicaStrategy
com.couchbase.client.java.kv.GetReplicaStrategy.FromIndex
- Enclosing class:
GetReplicaStrategy
-
Nested Class Summary
Nested classes/interfaces inherited from class com.couchbase.client.java.kv.GetReplicaStrategy
GetReplicaStrategy.FromIndex -
Method Summary
Methods inherited from class com.couchbase.client.java.kv.GetReplicaStrategy
any, fromIndex
-
Method Details
-
withWrap
Returns a new instance with the specified wrap setting.Set wrap to true if you want to efficiently read from a single replica, but don't necessarily care which one.
When wrap is true:
- The specified replica index, modulo the actual number of replicas configured on the bucket, is the starting point for a scan of all available replicas; the result may come from a different replica index than the one specified.
ReplicaIndexOutOfBoundsExceptionis not thrown unless there are no replicas.ReplicaIndexCurrentlyUnavailableExceptionis not thrown unless all replicas are currently unavailable.
Default value: false
- Returns:
- a new instance with the given wrap value.
-
toCore
- Specified by:
toCorein classGetReplicaStrategy
-