Class FlowClientConnection
- java.lang.Object
-
- io.pravega.client.connection.impl.FlowClientConnection
-
- All Implemented Interfaces:
ClientConnection
,java.lang.AutoCloseable
public class FlowClientConnection extends java.lang.Object implements ClientConnection
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.pravega.client.connection.impl.ClientConnection
ClientConnection.CompletedCallback
-
-
Constructor Summary
Constructors Constructor Description FlowClientConnection(java.lang.String connectionName, ClientConnection channel, int flowId, FlowHandler handler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Drop the connection.java.lang.String
getConnectionName()
int
getFlowId()
void
send(io.pravega.shared.protocol.netty.Append append)
Sends the provided append request.void
send(io.pravega.shared.protocol.netty.WireCommand cmd)
Sends the provided command.void
sendAsync(java.util.List<io.pravega.shared.protocol.netty.Append> appends, ClientConnection.CompletedCallback callback)
Sends the provided append commands.
-
-
-
Constructor Detail
-
FlowClientConnection
@ConstructorProperties({"connectionName","channel","flowId","handler"}) public FlowClientConnection(java.lang.String connectionName, ClientConnection channel, int flowId, FlowHandler handler)
-
-
Method Detail
-
send
public void send(io.pravega.shared.protocol.netty.WireCommand cmd) throws io.pravega.shared.protocol.netty.ConnectionFailedException
Description copied from interface:ClientConnection
Sends the provided command. This operation may block. (Though buffering is used to try to prevent it)- Specified by:
send
in interfaceClientConnection
- Parameters:
cmd
- The command to send.- Throws:
io.pravega.shared.protocol.netty.ConnectionFailedException
- The connection has died, and can no longer be used.
-
send
public void send(io.pravega.shared.protocol.netty.Append append) throws io.pravega.shared.protocol.netty.ConnectionFailedException
Description copied from interface:ClientConnection
Sends the provided append request. This operation may block. (Though buffering is used to try to prevent it)- Specified by:
send
in interfaceClientConnection
- 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
public void sendAsync(java.util.List<io.pravega.shared.protocol.netty.Append> appends, ClientConnection.CompletedCallback callback)
Description copied from interface:ClientConnection
Sends the provided append commands.- Specified by:
sendAsync
in interfaceClientConnection
- Parameters:
appends
- A list of append command to send.callback
- A callback to be invoked when the operation is complete
-
close
public void close()
Description copied from interface:ClientConnection
Drop the connection. No further operations may be performed.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceClientConnection
-
getConnectionName
public java.lang.String getConnectionName()
-
getFlowId
public int getFlowId()
-
-