File tree Expand file tree Collapse file tree 3 files changed +25
-5
lines changed Expand file tree Collapse file tree 3 files changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,10 @@ public List<ServerAddress> getServerAddressList() {
277277 return null ;
278278 }
279279
280+ public ReplicaSetStatus getReplicaSetStatus () {
281+ return _rsStatus ;
282+ }
283+
280284 public String getConnectPoint (){
281285 ServerAddress master = getAddress ();
282286 return master != null ? master .toString () : null ;
Original file line number Diff line number Diff line change @@ -395,6 +395,22 @@ public String getConnectPoint(){
395395 return _connector .getConnectPoint ();
396396 }
397397
398+ /**
399+ * Gets the underlying TCP connector
400+ * @return
401+ */
402+ DBTCPConnector getConnector () {
403+ return _connector ;
404+ }
405+
406+ /**
407+ * Gets the replica set status object
408+ * @return
409+ */
410+ public ReplicaSetStatus getReplicaSetStatus () {
411+ return _connector .getReplicaSetStatus ();
412+ }
413+
398414 /**
399415 * Gets the address of the current master
400416 * @return the address
@@ -498,10 +514,6 @@ void _applyMongoOptions() {
498514 setWriteConcern ( _options .getWriteConcern () );
499515 }
500516
501- DBTCPConnector getConnector () {
502- return _connector ;
503- }
504-
505517 final ServerAddress _addr ;
506518 final List <ServerAddress > _addrs ;
507519 final MongoOptions _options ;
Original file line number Diff line number Diff line change 1717 * slave delay
1818 * tags (when we do it)
1919 */
20- class ReplicaSetStatus {
20+ public class ReplicaSetStatus {
2121
2222 static final Logger _rootLogger = Logger .getLogger ( "com.mongodb.ReplicaSetStatus" );
2323 static final int UNAUTHENTICATED_ERROR_CODE = 10057 ;
@@ -38,6 +38,10 @@ boolean ready(){
3838 return _setName != null ;
3939 }
4040
41+ public String getName () {
42+ return _setName ;
43+ }
44+
4145 void _checkClosed (){
4246 if ( _closed )
4347 throw new IllegalStateException ( "ReplicaSetStatus closed" );
You can’t perform that action at this time.
0 commit comments