Make predefined ReadPreferences in TaggableReadPreference public

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • None
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      Current Situation

      The predefined ReadPreferences in TaggableReadPreference (NearestReadPreference, SecondaryPreferredReadPreference, SecondaryReadPreference) are package protected.

      A developer wanting to create a new ReadPreference cannot easily extend from one of the already available ones, and it has to, either duplicate code, or to create the new ReadPreference in a com.mongodb package.

      Desired Behaviour

      If the predefined ReadPreferences would be public, we could easily create new ones by extending them.

      Real Example

      In our case, we would like to create a ReadPreference that chooses one secondary node that does not have a special tag defined. This is currently not possible with the current predefined ReadPreferences, but would be very easy by extending the SecondaryPreferredReadPreference one.

              Assignee:
              Unassigned
              Reporter:
              Ruben Inoto
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: