|
XCC/J 3.2-9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This class encapsulates a server connection as returned
from a ConnectionProvider instance.
| Method Summary | |
ByteChannel |
channel()
The channel to be used for server communication. |
void |
close()
Close this server connection. |
long |
getTimeoutMillis()
A timeout value, in milliseconds, which is a hint to the provider upon return to indicate how long this connection should be considered valid. |
long |
getTimeoutTime()
Get the exact time, in milliseconds, at which this connection is considered to be expired. |
boolean |
isOpen()
Indicates whether the underlying connection channel is open. |
ConnectionProvider |
provider()
The ConnectionProvider to which this connection
should be returned. |
void |
setTimeoutMillis(long timeoutMillis)
Deprecated. Use setTimeoutTime(long) instead. |
void |
setTimeoutTime(long timeMillis)
Set the exact time, as milliseconds since the epoch, at which this connection is to be considered expired. |
| Method Detail |
public ByteChannel channel()
ByteChannel
connected to a server.public ConnectionProvider provider()
ConnectionProvider to which this connection
should be returned.
ConnectionProvider.public long getTimeoutMillis()
A timeout value, in milliseconds, which is a hint
to the provider upon return to indicate how long this
connection should be considered valid.
Providers are expected to set this value to zero
when giving out a connection via
ConnectionProvider.obtainConnection(com.marklogic.xcc.Session, java.util.logging.Logger).
As of 3.2-6 and later, this method returns the number of milliseconds until this connection will expire. If the connection is already expired, then zero is returned.
public void setTimeoutMillis(long timeoutMillis)
setTimeoutTime(long) instead.
ConnectionProvider.returnConnection(ServerConnection, java.util.logging.Logger).
timeoutMillis - A duration, in milliseconds.public long getTimeoutTime()
System.currentTimeMillis()public void setTimeoutTime(long timeMillis)
timeMillis - A time in milliseconds, as for
System.currentTimeMillis()public void close()
public boolean isOpen()
|
XCC/J 3.2-9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com