Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2582

Make predefined ReadPreferences in TaggableReadPreference public

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

      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 Unassigned
            Reporter:
            rinoto Ruben Inoto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: