public interface ServerConnection
ConnectionProvider
instance.Modifier and Type | Method and Description |
---|---|
java.nio.channels.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.
|
java.nio.channels.ByteChannel channel()
ByteChannel
connected to a
server.ConnectionProvider provider()
ConnectionProvider
to which this connection should be returned.ConnectionProvider
.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,com.marklogic.xcc.Request,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.
@Deprecated void setTimeoutMillis(long timeoutMillis)
setTimeoutTime(long)
instead.ConnectionProvider.returnConnection(ServerConnection,
java.util.logging.Logger)
.timeoutMillis
- A duration, in milliseconds.long getTimeoutTime()
System.currentTimeMillis()
void setTimeoutTime(long timeMillis)
timeMillis
- A time in milliseconds, as for
System.currentTimeMillis()
void close()
boolean isOpen()
Copyright © 2024 MarkLogic
Corporation
Complete online documentation for MarkLogic Server,
XQuery and related components may
be found at
developer.marklogic.com