Class RandomSelectionStrategy
java.lang.Object
com.couchbase.client.core.service.strategies.RandomSelectionStrategy
- All Implemented Interfaces:
SelectionStrategy
public class RandomSelectionStrategy extends Object implements SelectionStrategy
- Since:
- 1.0
- Author:
- Michael Nitschinger
-
Constructor Summary
Constructors Constructor Description RandomSelectionStrategy()
-
Method Summary
Modifier and Type Method Description Endpoint
select(CouchbaseRequest request, List<Endpoint> endpoints)
Selects anEndpoint
for the givenCouchbaseRequest
.
-
Constructor Details
-
RandomSelectionStrategy
public RandomSelectionStrategy()
-
-
Method Details
-
select
Description copied from interface:SelectionStrategy
Selects anEndpoint
for the givenCouchbaseRequest
. 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.- Specified by:
select
in interfaceSelectionStrategy
- Parameters:
request
- the input request.endpoints
- all the available endpoints.- Returns:
- the selected endpoint.
-