@ SuppressWarnings ( "deprecation" ) @ Nullable public ServerAddress getMaster ( ) { List < ServerDescription > primaries = getClusterDescription ( ) . getPrimaries ( ) ; return primaries . isEmpty ( ) ? null : primaries . get ( 0 ) . getAddress ( ) ; }
Gets the ServerAddress of the master server in this replica set .