ServerAddress instead.@Deprecated public class DBAddress extends ServerAddress
| Constructor and Description |
|---|
DBAddress(DBAddress other,
String databaseName)
Deprecated.
Create a DBAddress using the host and port from an existing DBAddress, and connected to a given database.
|
DBAddress(InetAddress inetAddress,
int port,
String databaseName)
Deprecated.
|
DBAddress(String urlFormat)
Deprecated.
Creates a new address.
|
DBAddress(String host,
int port,
String databaseName)
Deprecated.
Creates a DBAddress for the given database on the given host at the given port.
|
DBAddress(String host,
String databaseName)
Deprecated.
Creates a DBAddress for the given database on the given host.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other)
Deprecated.
|
String |
getDBName()
Deprecated.
Gets the database name
|
DBAddress |
getSister(String name)
Deprecated.
Creates a DBAddress pointing to a different database on the same server.
|
int |
hashCode()
Deprecated.
|
String |
toString()
Deprecated.
Gets a String representation of address as host:port/databaseName.
|
defaultHost, defaultPort, getHost, getPort, getSocketAddress, sameHostpublic DBAddress(String urlFormat)
urlFormat - the URL-formatted host and portMongoClientURIpublic DBAddress(DBAddress other, String databaseName)
other - an existing DBAddress that gives the host and portdatabaseName - the database to which to connectpublic DBAddress(String host, String databaseName)
host - host namedatabaseName - database namepublic DBAddress(String host, int port, String databaseName)
host - host nameport - database portdatabaseName - database namepublic DBAddress(InetAddress inetAddress, int port, String databaseName)
inetAddress - host addressport - database portdatabaseName - database namepublic int hashCode()
hashCode in class ServerAddresspublic boolean equals(Object other)
equals in class ServerAddresspublic DBAddress getSister(String name)
name - database nameMongoException - if failedpublic String getDBName()
public String toString()
toString in class ServerAddress