[JAVA-5217] Remove getCluster method from ClusterAwareReadWriteBinding Created: 25/Oct/23  Updated: 05/Dec/23  Resolved: 07/Nov/23

Status: Closed
Project: Java Driver
Component/s: Internal
Affects Version/s: None
Fix Version/s: 5.0.0

Type: Improvement Priority: Minor - P4
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: tech-debt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Documentation Changes: Not Needed
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
2. Would you like the user to see examples of the syntax and/or executable code and its output?
3. Which versions of the driver/connector does this apply to?


 Description   

After simplifying session acquisition, the ClusterAwareReadWriteBinding#getCluster method is no longer used, but we neglected to remove it. Let's remove it in order to simplify the abstraction.

The interface itself has since gained a second method (getConnectionSource(ServerAddress serverAddress)), so without some further refactoring we can't just delete the entire interface.

The same applies to the async version of this interface.



 Comments   
Comment by Githook User [ 05/Dec/23 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Remove getCluster method (#1245)

from the following internal interfaces:

  • ClusterAwareReadWriteBinding
  • AsyncClusterAwareReadWriteBinding

The interfaces remain as they have picket up a second method.

JAVA-5217
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/a0906e7bf0c9f345e2e804203433467d03d498e9

Comment by Githook User [ 20/Nov/23 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Remove getCluster method (#1245)

from the following internal interfaces:

  • ClusterAwareReadWriteBinding
  • AsyncClusterAwareReadWriteBinding

The interfaces remain as they have picket up a second method.

JAVA-5217
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/96e8232065a5249042b70cbd2b0d18d0225eea91

Comment by Tom Selander [ 30/Oct/23 ]

Triage: we can potentially rename this but choosing a name that makes sense might be tricky

Generated at Thu Feb 08 09:04:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.