Interface ReadPreferenceAware
- All Known Subinterfaces:
CursorPreparer
,FindPublisherPreparer
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
-
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.
-