|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mongodb.DBPort
public class DBPort
represents a Port to the database, which is effectively a single connection to a server Methods implemented at the port level should throw the raw exceptions like IOException, so that the connector above can make appropriate decisions on how to handle.
| Field Summary | |
|---|---|
static int |
PORT
the default port |
| Constructor Summary | |
|---|---|
DBPort(ServerAddress addr)
creates a new DBPort |
|
| Method Summary | |
|---|---|
protected void |
close()
closes the underlying connection and streams |
void |
ensureOpen()
makes sure that a connection to the server has been opened |
protected void |
finalize()
|
DBPortPool |
getPool()
Gets the pool that this port belongs to. |
int |
hashCode()
|
String |
host()
returns a String representation of the target host |
ServerAddress |
serverAddress()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int PORT
| Constructor Detail |
|---|
public DBPort(ServerAddress addr)
addr - the server address| Method Detail |
|---|
public void ensureOpen()
throws IOException
IOExceptionpublic int hashCode()
hashCode in class Objectpublic String host()
public ServerAddress serverAddress()
public String toString()
toString in class Object
protected void finalize()
throws Throwable
finalize in class ObjectThrowableprotected void close()
public DBPortPool getPool()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||