public class RoundRobinSelectionStrategy extends Object implements SelectionStrategy
Modifier and Type | Field and Description |
---|---|
protected int |
skip |
Constructor and Description |
---|
RoundRobinSelectionStrategy() |
Modifier and Type | Method and Description |
---|---|
Endpoint |
select(CouchbaseRequest request,
List<Endpoint> endpoints)
Selects an
Endpoint for the given CouchbaseRequest . |
protected void |
setSkip(int newValue)
Force a value to the skip counter, mainly for testing purposes.
|
public Endpoint select(CouchbaseRequest request, List<Endpoint> endpoints)
Endpoint
for the given CouchbaseRequest
.
If null is returned, it means that no endpoint could be selected and it is up to the calling party
to decide what to do next.select
in interface SelectionStrategy
request
- the input request.endpoints
- all the available endpoints.protected void setSkip(int newValue)
newValue
- the new skip value to apply.Copyright © 2021 Couchbase, Inc.. All rights reserved.