public class TarantoolConnectionImpl extends Object implements TarantoolConnection
| Modifier and Type | Field and Description |
|---|---|
protected io.netty.channel.Channel |
channel |
protected RequestFutureManager |
requestManager |
protected TarantoolVersionHolder |
versionHolder |
| Constructor and Description |
|---|
TarantoolConnectionImpl(RequestFutureManager requestManager,
TarantoolVersionHolder versionHolder,
io.netty.channel.Channel channel) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionCloseListener(TarantoolConnectionCloseListener listener)
Add a listener which is invoked when the connection is closed.
|
void |
addConnectionFailureListener(TarantoolConnectionFailureListener listener)
Add a listener which is invoked when the connection is broken from the server side (e.g. server closed
the connection or a network failure has occurred).
|
void |
close() |
io.netty.channel.Channel |
getChannel()
Get the Netty channel baking this connection
|
InetSocketAddress |
getRemoteAddress()
Get the Tarantool server address for this connection
|
TarantoolVersion |
getVersion()
Get the Tarantool server version
|
boolean |
isConnected()
Get the connection status
|
TarantoolRequestMetadata |
sendRequest(TarantoolRequest request)
Send a prepared request to the Tarantool server and flush the buffer
|
protected final TarantoolVersionHolder versionHolder
protected final RequestFutureManager requestManager
protected final io.netty.channel.Channel channel
public TarantoolConnectionImpl(RequestFutureManager requestManager, TarantoolVersionHolder versionHolder, io.netty.channel.Channel channel)
public InetSocketAddress getRemoteAddress() throws TarantoolClientException
TarantoolConnectiongetRemoteAddress in interface TarantoolConnectionTarantoolClientException - if the client is not connectedpublic TarantoolVersion getVersion() throws TarantoolClientException
TarantoolConnectiongetVersion in interface TarantoolConnectionTarantoolVersionTarantoolClientException - if the client is not connectedpublic boolean isConnected()
TarantoolConnectionisConnected in interface TarantoolConnectionpublic TarantoolRequestMetadata sendRequest(TarantoolRequest request)
TarantoolConnectionsendRequest in interface TarantoolConnectionrequest - the requestpublic io.netty.channel.Channel getChannel()
TarantoolConnectiongetChannel in interface TarantoolConnectionpublic void addConnectionFailureListener(TarantoolConnectionFailureListener listener)
TarantoolConnectionaddConnectionFailureListener in interface TarantoolConnectionlistener - a TarantoolConnectionFailureListener instancepublic void addConnectionCloseListener(TarantoolConnectionCloseListener listener)
TarantoolConnectionaddConnectionCloseListener in interface TarantoolConnectionlistener - a TarantoolConnectionCloseListener instancepublic void close()
close in interface AutoCloseableCopyright © 2025 Picodata. All rights reserved.