[JAVA-1068] ReadPreference.primary() semantic ambiguity... Created: 02/Jan/14  Updated: 02/Jan/14  Resolved: 02/Jan/14

Status: Closed
Project: Java Driver
Component/s: API, Documentation
Affects Version/s: 2.11.3
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Nadia Boumaza Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The current naming convention in Read Preference when set to "primary"
might be ambiguous- (specifically that this is the default mode)

Rename Read Preference Modes "primary" to "primaryOnly"
would make it more clear that if the primary is unavailable, read operations produce an error or throw an exception.

API:
Rename ReadPreference.primary() to ReadPreference.primaryOnly()



 Comments   
Comment by Jeffrey Yemin [ 02/Jan/14 ]

There are a few reasons why we're not going to make this change, even if this name is better (and I'm not convinced it is:

  1. All of our supported drivers in various languages use this name
  2. mongos uses this name
  3. changing it would break binary compatibility
Generated at Thu Feb 08 08:53:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.