Interface ClientConnection
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
FlowClientConnection,TcpClientConnection
public interface ClientConnection extends java.lang.AutoCloseableA connection object. Represents the TCP connection in the client process that connects to the server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceClientConnection.CompletedCallback
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Drop the connection.voidsend(io.pravega.shared.protocol.netty.Append append)Sends the provided append request.voidsend(io.pravega.shared.protocol.netty.WireCommand cmd)Sends the provided command.voidsendAsync(java.util.List<io.pravega.shared.protocol.netty.Append> appends, ClientConnection.CompletedCallback callback)Sends the provided append commands.
-
-
-
Method Detail
-
send
void send(io.pravega.shared.protocol.netty.WireCommand cmd) throws io.pravega.shared.protocol.netty.ConnectionFailedException
Sends the provided command. This operation may block. (Though buffering is used to try to prevent it)- Parameters:
cmd- The command to send.- Throws:
io.pravega.shared.protocol.netty.ConnectionFailedException- The connection has died, and can no longer be used.
-
send
void send(io.pravega.shared.protocol.netty.Append append) throws io.pravega.shared.protocol.netty.ConnectionFailedException
Sends the provided append request. This operation may block. (Though buffering is used to try to prevent it)- Parameters:
append- The append command to send.- Throws:
io.pravega.shared.protocol.netty.ConnectionFailedException- The connection has died, and can no longer be used.
-
sendAsync
void sendAsync(java.util.List<io.pravega.shared.protocol.netty.Append> appends, ClientConnection.CompletedCallback callback)Sends the provided append commands.- Parameters:
appends- A list of append command to send.callback- A callback to be invoked when the operation is complete
-
close
void close()
Drop the connection. No further operations may be performed.- Specified by:
closein interfacejava.lang.AutoCloseable
-
-