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
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.SharableNested classes/interfaces inherited from interface org.apache.cassandra.streaming.StreamingChannel
StreamingChannel.Factory, StreamingChannel.Kind, StreamingChannel.Send -
Constructor Summary
ConstructorsConstructorDescriptionNettyStreamingChannel(io.netty.channel.Channel channel, StreamingChannel.Kind kind) -
Method Summary
Modifier and TypeMethodDescriptionuntil closed, cannot invokeStreamingChannel.send(Send)voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx) voidchannelRead(io.netty.channel.ChannelHandlerContext ctx, Object message) io.netty.util.concurrent.Future<?>close()booleanvoidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) id()in()voidpeer()Future<?>send(StreamingChannel.Send send) static voidshutdown()Shutdown for in-JVM tests.static voidMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Constructor Details
-
NettyStreamingChannel
-
-
Method Details
-
id
- Specified by:
idin interfaceStreamingChannel
-
description
- Specified by:
descriptionin interfaceStreamingChannel
-
peer
- Specified by:
peerin interfaceStreamingChannel
-
connectedTo
- Specified by:
connectedToin interfaceStreamingChannel
-
connected
public boolean connected()- Specified by:
connectedin interfaceStreamingChannel
-
in
- Specified by:
inin interfaceStreamingChannel
-
acquireOut
Description copied from interface:StreamingChanneluntil closed, cannot invokeStreamingChannel.send(Send)- Specified by:
acquireOutin interfaceStreamingChannel
-
send
- Specified by:
sendin interfaceStreamingChannel
-
close
public io.netty.util.concurrent.Future<?> close()- Specified by:
closein interfaceStreamingChannel
-
onClose
- Specified by:
onClosein interfaceStreamingChannel
-
channelRead
- Specified by:
channelReadin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelReadin classio.netty.channel.ChannelInboundHandlerAdapter
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
channelInactivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelInactivein classio.netty.channel.ChannelInboundHandlerAdapter
-
exceptionCaught
- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelHandler- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
exceptionCaughtin classio.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()
-