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