Package org.apache.cassandra.net
Class FrameDecoderCrc
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
org.apache.cassandra.net.FrameDecoder
org.apache.cassandra.net.FrameDecoderCrc
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
Framing format that protects integrity of data in movement with CRCs (of both header and payload).
Every on-wire frame contains:
1. Payload length (17 bits)
2.
isSelfContained flag (1 bit)
3. Header padding (6 bits)
4. CRC24 of the header (24 bits)
5. Payload (up to 2 ^ 17 - 1 bits)
6. Payload CRC32 (32 bits)
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Payload Length |C| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
CRC24 of Header | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
| |
+ +
| Payload |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| CRC32 of Payload |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.cassandra.net.FrameDecoder
FrameDecoder.CorruptFrame, FrameDecoder.Frame, FrameDecoder.FrameProcessor, FrameDecoder.IntactFrameNested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
Fields inherited from class org.apache.cassandra.net.FrameDecoder
allocator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FrameDecoderCrccreate(BufferPoolAllocator allocator) protected voiddecode(Collection<FrameDecoder.Frame> into, ShareableBytes newBytes, int headerLength) Decode a number of frames using the above abstract method implementations.Methods inherited from class org.apache.cassandra.net.FrameDecoder
activate, channelInactive, channelRead, channelReadComplete, discard, handlerAdded, isActive, reactivateMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, 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
handlerRemoved
-
Constructor Details
-
FrameDecoderCrc
-
-
Method Details
-
create
-