Package org.apache.cassandra.net
package org.apache.cassandra.net
-
ClassDescriptionCore logic for handling inbound message deserialization and execution (in tandem with
FrameDecoder).A special-purpose wait queue to park inbound message handlers that failed to allocate reserve capacity for a message in.ADataOutputStreamPlusthat writes ASYNCHRONOUSLY to a Netty Channel.SeeAsyncPromiseandChannelPromiseThis class is all boiler plate, just ensuring we return ourselves and invoke the correct Promise method.ADataOutputStreamPlusthat writes ASYNCHRONOUSLY to a Netty Channel.A callback specialized for returning a value from a single target; that is, this is for messages that we only send to one recipient.ADataOutputStreamPlusthat writes ASYNCHRONOUSLY to a Netty Channel.A trivial wrapper around BufferPool for integrating with Netty, but retaining ownership of pooling behaviour that is integrated into Cassandra's other pooling.A simple extension to UnpooledUnsafeDirectByteBuf that returns buffers to BufferPool on deallocate, and permits extracting the buffer from it to take ownership and use directly.Map of hosts to their known current messaging versions.A container used to store a node -> message_id map for inter-DC write forwarding.A Netty inbound handler that decodes incoming frames and passes them forward toInboundMessageHandlerfor processing.A corrupted frame was encountered; this represents the knowledge we have about this frame, and whether or not the stream is recoverable.The payload bytes of a complete frame, i.e.Framing format that protects integrity of data in movement with CRCs (of both header and payload).Framing format that compresses payloads with LZ4, and protects integrity of data in movement with CRCs (of both header and payload).An abstraction useful for transparently allocating buffers that can be written to upstream of theFrameEncoderwithout knowledge of the encoder's frame layout, while ensuring enough space to write the remainder of the frame's contents is reserved.Please seeFrameDecoderCrcfor description of the framing produced by this encoder.Please seeFrameDecoderLZ4for description of the framing produced by this encoder.A delegating future, that we can extend to provide subtly modified behaviour.FutureResult<V>An abstraction for yielding a result performed by an asynchronous task, for whom we may wish to offer cancellation, but no other access to the underlying taskImplementation ofAbstractMessageHandlerfor processing internode messages from peers.An aggregation ofInboundMessageHandlers for all connections from a peer.A message sink that all inbound messages go through.Class that contains certificate utility methods.Discard handler releases the received data silently.IVerbHandler<T>IVerbHandler provides the method that all verb handlers need to implement.Callback thatDynamicEndpointSnitchlistens to in order to update host scores.Message<T>Immutable main unit of internode communication - what used to beMessageInandMessageOutfused in one class.Split into a separate object to allow partial message deserialization without wasting work and allocation afterwards, if the entire message is necessary and available.Each message contains a header with several fixed fields, an optional key-value params section, and then the message payload itself.Binary message flags to be passed asflagsfield ofMessage.MessagingService implements all internode communication - with the exception of SSTable streaming (for now).MBean exposing MessagingService metrics plus allowing to enable/disable back-pressure.Empty message payload - primarily used for responses.Represents a connection type to a peer, and handles the state transistions on the connection and the nettyChannel.OutboundConnectionInitiator<SuccessType extends OutboundConnectionInitiator.Result.Success>AChannelHandlerto execute the send-side of the internode handshake protocol.OutboundConnectionInitiator.Result<SuccessType extends OutboundConnectionInitiator.Result.Success>The result of the handshake.OutboundConnectionInitiator.Result.Success<SuccessType extends OutboundConnectionInitiator.Result.Success>Groups a set of outbound connections to a given peer, and routes outgoing messages to the appropriate connection (based upon message's type or size).A collection of settings to be passed around for outbound connections.A message sink that all outbound messages go through.Type names and serializers for various parameters that can be put inMessageparams map.Indicates to the recipient whichConnectionTypeshould be used for the response.implementors ofRequestCallbackneed to make sure that any public methods are threadsafe with respect toRequestCallback.onResponse(org.apache.cassandra.net.Message<T>)being called from the message service.An expiring map of request callbacks.A cheaper, thread-unsafe permit container to be used for unshared limits.A thread-safe permit container.A convenience class that groups a per-endpoint limit with the global one to allow allocating/releasing permits from/to both limits as one logical operation.Represents permits to utilise a resource and ways to allocate and release them.A wrapper for possibly sharing portions of a single,BufferPools.forNetworking()managed,ByteBuffer; optimised for the case where no sharing is necessary.Netty's DefaultFileRegion closes the underlying FileChannel as soon as the refCnt() for the region drops to zero, this is an implementation of the DefaultFileRegion that doesn't close the FileChannel.A factory for building NettyChannels.Note that priorities except P0 are presently unused.