@Deprecated public class DBPort extends 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.
|
String |
host()
Deprecated.
returns a String representation of the target host
|
boolean |
isClosed()
Deprecated.
|
ServerAddress |
serverAddress()
Deprecated.
|
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 IOException
IOException
public String host()
public ServerAddress serverAddress()
public boolean isClosed()
public void close()
public DBPortPool getPool()
public long getUsageCount()