@Deprecated
public class DBPort
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
PORT
Deprecated.
the default port
|
| Constructor and Description |
|---|
DBPort(ServerAddress addr)
Deprecated.
creates a new DBPort
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Deprecated.
closes the underlying connection and streams
|
void |
ensureOpen()
Deprecated.
makes sure that a connection to the server has been opened
|
int |
getGeneration()
Deprecated.
Gets the generation of this connection.
|
long |
getLastUsedAt()
Deprecated.
Returns the time at which this connection was last used, or
Long.MAX_VALUE if it has not yet been used. |
long |
getOpenedAt()
Deprecated.
Returns the time at which this connection was opened, or
Long.MAX_VALUE if it has not yet been opened. |
DBPortPool |
getPool()
Deprecated.
Gets the pool that this port belongs to.
|
long |
getUsageCount()
Deprecated.
|
int |
hashCode()
Deprecated.
|
java.lang.String |
host()
Deprecated.
returns a String representation of the target host
|
boolean |
isClosed()
Deprecated.
|
ServerAddress |
serverAddress()
Deprecated.
|
java.lang.String |
toString()
Deprecated.
|
public static final int PORT
public DBPort(ServerAddress addr)
addr - the server addresspublic int getGeneration()
public long getOpenedAt()
Long.MAX_VALUE if it has not yet been opened.public long getLastUsedAt()
Long.MAX_VALUE if it has not yet been used.public void ensureOpen()
throws java.io.IOException
java.io.IOExceptionpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String host()
public ServerAddress serverAddress()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isClosed()
public void close()
public DBPortPool getPool()
public long getUsageCount()