Serializable
ServerAddress
instead.@Deprecated public class DBAddress extends ServerAddress
Constructor | 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(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.
|
DBAddress(InetAddress inetAddress,
int port,
String databaseName) |
Deprecated.
|
Modifier and Type | Method | 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.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
defaultHost, defaultPort, getHost, getPort, getSocketAddress, sameHost
public DBAddress(String urlFormat)
urlFormat
- the URL-formatted host and portMongoClientURI
public 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 ServerAddress
public boolean equals(Object other)
equals
in class ServerAddress
public DBAddress getSister(String name)
name
- database nameMongoException
- if failedpublic String getDBName()
public String toString()
toString
in class ServerAddress