Interface ClientConnection

  • All Superinterfaces:
    java.lang.AutoCloseable
    All Known Implementing Classes:
    FlowClientConnection, TcpClientConnection

    public interface ClientConnection
    extends java.lang.AutoCloseable
    A connection object. Represents the TCP connection in the client process that connects to the server.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Drop the connection.
      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.
    • 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:
        close in interface java.lang.AutoCloseable