Package org.jgroups.protocols
package org.jgroups.protocols
Provides implementations of transport protocols which are
responsible for sending and receiving messages to/from the network.
-
ClassDescriptionEncrypts and decrypts communication in JGroups by using a secret key distributed to all cluster members by the key server (coordinator) using asymmetric (public/private key) encryption.
The secret key is identical for all cluster members and is used to encrypt messages when sending and decrypt them when receiving messages.The AUTH protocol adds a layer of authentication to JGroups.AuthHeader is a holder object for the token that is passed from the joiner to the coordinatorAll messages up the stack have to go through a barrier (read lock, RL).Implements storing of messages in a hashmap and sending of single messages and message batches.Shared base class for TCP protocolsBatches messages near the top of the stack.Broadcast PING.Pluggable way to collect messages and send them as batchesSample implementation ofSSL_KEY_EXCHANGE.SessionVerifierProtocol which clears a set of flags in the down or up direction for all messagesCompresses the payload of a message.Protocol which is used byCounterServiceto provide a distributed atomic counterImplementation of daisy chaining.Delays incoming/outgoing messages by a random number of milliseconds (range between 0 and n where n is determined by the user) and nanoseconds (constant amount).Key exchange based on Diffie-Hellman-Merkle (https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange).
Diffie-Hellman is used between a member and a key server (the coordinator) to obtain a session key (only known to the key server and the joiner) which is used by the key server to encrypt the shared secret symmetric (group) key and by the requester to decrypt the group key it gets in the response of the key server.Discards up or down messages based on a percentage; e.g., setting property 'up' to 0.1 causes 10% of all up messages to be discarded.Discards a message whose sequence number (in the payload, as a Long) matches seqno 2 times, before passing it down.The Discovery protocol retrieves the initial membership (used by GMS and MERGE3) by sending discovery requests.Protocol which drops up or down messages according to user-defined filtersDuplicates outgoing or incoming messages by copying themEncrypt<E extends KeyStore.Entry>Super class of symmetric (SYM_ENCRYPT) and asymmetric (ASYM_ENCRYPT) encryption protocols.Example of a protocol layer.Base class for all failure detection protocolsHeader used by various flow control protocolsFailure detection based on simple heartbeat protocol.Failure detection based on simple heartbeat protocol.Failure detection based on simple heartbeat protocol.Failure detection protocol which detects the crash or hanging of entire hosts and suspects all cluster members on those hosts.Command used to check whether a given host is alive, periodically calledFailure detection protocol based on sockets.Handles a client connection; multiple client can connect at the same timeFailure detection protocol based on TCP connections, successor toFD_SOCK.Simple discovery protocol which uses a file on shared storage such as an SMB share, NFS mount or S3.Simple flow control protocol based on a credit system.The FORK protocol; multiplexes messages to different forks in a stack (https://issues.redhat.com/browse/JGRP-1613).Fragmentation layer.Fragmentation layer.Class represents an entry for a message.Fragmentation protocol which uses less memory to store fragments thanFRAG2.
When a message is fragmented, all fragments carry the size of the original message, their offset and length with respect to the original message and a fragment ID (to identify the fragment).
When the first fragment is received, the full message is created and each fragment copies its data into the full message at its offset and length.Fragmentation layer.Base class for all fragmentation protocols.Prints the headers of all sent or received messagesCarries random bits of informationSimple protocol to inject an arbitrary view on one or more cluster nodes.Discovery protocol using a JDBC connection to a shared database.New version ofJDBC_PING.Base class for protocols implementing key exchange: a secret key to be used for encryption is exchanged between 2 parties (usually the key server and a new cluster member) securely; ie.Discovery protocol for finding members in the local process only.A local transport is used for sending messages only to single (or all) members of the same host.Intercepts individual up messages and creates batches from them, passing the batches up.Protocol to discover subgroups; e.g., existing due to a network partition (that healed).Simple flow control protocol based on a credit system.Uses its own IP multicast socket to send and receive discovery requests/responses.Class which has all the stats about received/sent messages etc.Negative AcKnowledgement layer (NAKs).New multicast protocol based on fixed-size xmit windows and message ACKs
Details: https://issues.redhat.com/browse/JGRP-2780Bundler which doesn't bundle :-) Can be used to measure the diff between bundling and non-bundling (e.g.Detects sends during processing of incoming messages and sets flagMessage.TransientFlag.DONT_BLOCKto prevent blocking the incoming thread on a send.
JIRA: https://issues.redhat.com/browse/JGRP-2772Persistent Discovery Cache.Queues messages per destination ('null' is a special destination).Protocol measuring latency between stacks.The PING protocol retrieves the initial membership by mcasting a discovery request (via the multicast capable transport) to all current cluster membersEncapsulates information about a cluster node, e.g.Used to send discovery requests and responsesDiscovery protocol based on Rackspace Cloud Files storage solutionA thread safe Rackspace ReST clientMeasures incoming and outgoing rates: messages/sec, bytes/sec.Protocol which sends at most max_bytes in time_period milliseconds.Rate limiter based credits (max_bytes).Deprecated, for removal: This API element is subject to removal in a future version.Functionality replaced by PerDestinationBundler, see https://redhat.atlassian.net/browse/JGRP-3027Base class for reliable multicast protocolsBase class for reliable unicast protocolsReverses the next N messages that are received.Protocol which implements synchronous messages (https://issues.redhat.com/browse/JGRP-1389).Header to measure round-trip times (in nanoseconds) for sync RPCs (https://issues.redhat.com/browse/JGRP-2604)Implementation of total order protocol using a sequencer.Implementation of total order protocol using a sequencer_uum.Serializes the entire message (including payload, headers, flags and destination and src) into the payload of another message that's then sent.Loopback transport shared by all channels within the same VM.Discovery protocol running overSHARED_LOOPBACKonly.Reorders messages by buffering them and shuffling the result after TIMEOUT ms.Protocol which lists how many messages have been received by size: https://issues.redhat.com/browse/JGRP-2893
Don't use this layer in a production stack since the costs are high; only use for debugging/diagnosis.Records number of messages sent/received based on sizeProtocol trying to print message payloads as stringsPeriodically fetches some attributes and writes them to a file (https://issues.redhat.com/browse/JGRP-2402)Key exchange based on SSL sockets.Provides various statsProtocol which provides STOMP (https://stomp.github.io/) support.Discovery protocol based on Openstack Swift (object storage).A thread safe Swift clientEncrypts and decrypts communication in JGroups by using a secret key shared by all cluster members.TCP based protocol.Protocol using TCP/IP to send and receive messages.The TCPGOSSIP protocol layer retrieves the initial membership (used by GMS when started by sending event FIND_INITIAL_MBRS down the stack).The TCPPING protocol defines a static cluster membership.Maintains averages of up- and down-threadsProtocol measuring delivery times.Generic transport - specific implementations should extend this class.Base class forTPwhich captures fields and accessors.Generic transport header, used by TP.This bundler adds all (unicast or multicast) messages to a queue until max size has been exceeded, but does send messages immediately when no other messages are available.Replacement for UDP.IP multicast transport based on UDP.Simple flow control protocol based on a credit system.InterceptsProtocol.up(MessageBatch)and passes up each message of a message batch as a single message.Unbatches OOB batches when enabled and virtual threads are available.
https://issues.redhat.com/browse/JGRP-2888Reliable unicast protocol using a combination of positive and negative acks.New unicast protocol based on fixed-size xmit windows and message ACKs
Details: https://issues.redhat.com/browse/JGRP-2843Header for subclasses ofReliableUnicast, e.g.Moved out ofUNICAST3into separate class.Catches SUSPECT events traveling up the stack.Double-checks that a suspected member is really dead.
Details: https://issues.redhat.com/browse/JGRP-2558
Design: https://github.com/belaban/JGroups/blob/master/doc/design/VERIFY_SUSPECT2.txtMaintains a version number and adds it to all outbound messages.