Class NettyStreamingChannel

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
org.apache.cassandra.streaming.async.NettyStreamingChannel
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, StreamingChannel

public class NettyStreamingChannel extends io.netty.channel.ChannelInboundHandlerAdapter implements StreamingChannel
  • Constructor Details

    • NettyStreamingChannel

      public NettyStreamingChannel(io.netty.channel.Channel channel, StreamingChannel.Kind kind)
  • Method Details

    • id

      public Object id()
      Specified by:
      id in interface StreamingChannel
    • description

      public String description()
      Specified by:
      description in interface StreamingChannel
    • peer

      public InetSocketAddress peer()
      Specified by:
      peer in interface StreamingChannel
    • connectedTo

      public InetSocketAddress connectedTo()
      Specified by:
      connectedTo in interface StreamingChannel
    • connected

      public boolean connected()
      Specified by:
      connected in interface StreamingChannel
    • in

      Specified by:
      in in interface StreamingChannel
    • acquireOut

      public StreamingDataOutputPlus acquireOut()
      Description copied from interface: StreamingChannel
      until closed, cannot invoke StreamingChannel.send(Send)
      Specified by:
      acquireOut in interface StreamingChannel
    • send

      public Future<?> send(StreamingChannel.Send send)
      Specified by:
      send in interface StreamingChannel
    • close

      public io.netty.util.concurrent.Future<?> close()
      Specified by:
      close in interface StreamingChannel
    • onClose

      public void onClose(Runnable runOnClose)
      Specified by:
      onClose in interface StreamingChannel
    • channelRead

      public void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object message)
      Specified by:
      channelRead in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelRead in class io.netty.channel.ChannelInboundHandlerAdapter
    • channelInactive

      public void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
      Specified by:
      channelInactive in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelInactive in class io.netty.channel.ChannelInboundHandlerAdapter
    • exceptionCaught

      public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
      Specified by:
      exceptionCaught in interface io.netty.channel.ChannelHandler
      Specified by:
      exceptionCaught in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      exceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapter
    • shutdown

      public static void shutdown()
      Shutdown for in-JVM tests. For any other usage, tracking of active inbound streaming handlers should be revisted first and in-JVM shutdown refactored with it. This does not prevent new inbound handlers being added after shutdown, nor is not thread-safe around new inbound handlers being opened during shutdown.
    • trackInboundHandlers

      public static void trackInboundHandlers()