Interface ReadPreferenceAware
- All Known Subinterfaces:
CursorPreparer
,FindPublisherPreparer
,MongoTransactionOptions
- All Known Implementing Classes:
AggregationOptions
,BasicQuery
,MongoTemplate
,NearQuery
,Query
,TextQuery
public interface ReadPreferenceAware
Interface to be implemented by any object that wishes to expose the
ReadPreference
.
Typically implemented by cursor or query preparer objects.
- Since:
- 2.2
- Author:
- Christoph Strobl, Mark Paluch
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncom.mongodb.ReadPreference
default boolean
-
Method Details
-
hasReadPreference
default boolean hasReadPreference()- Returns:
- true if a
ReadPreference
is set.
-
getReadPreference
- Returns:
- the
ReadPreference
to apply or null if none set.
-