Package org.jgroups.protocols
Provides implementations of transport protocols which are
responsible for sending and receiving messages to/from the network.
-
Interface Summary Interface Description Bundler Pluggable way to collect messages and send them as batchesCOUNTER.Request FD_HOST.PingCommand Command used to check whether a given host is alive, periodically calledLocalTransport A local transport is used for sending messages only to single (or all) members of the same host.SSL_KEY_EXCHANGE.SessionVerifier SWIFT_PING.Authenticator Contract for Swift authentication providersTUNNEL.TUNNELPolicy -
Class Summary Class Description AlternatingBundler Bundler implementation which sends message batches (or single messages) as soon as the target destination changes (or max_bundler_size would be exceeded).
Messages are removed from the main queue one by one and processed as follows:
A B B C C A causes the following sends: A -> {CC} -> {BB} -> A
Note that null is also a valid destination (send-to-all).
JIRA: https://issues.redhat.com/browse/JGRP-2171ASYM_ENCRYPT Encrypts 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.AsyncNoBundler Simple and stupid async version of NoBundler.AUTH The AUTH protocol adds a layer of authentication to JGroups.AuthHeader AuthHeader is a holder object for the token that is passed from the joiner to the coordinatorBARRIER All messages up the stack have to go through a barrier (read lock, RL).BaseBundler Implements storing of messages in a hashmap and sending of single messages and message batches.BasicTCP Shared base class for TCP protocolsBATCH Batches messages near the top of the stack.BATCH.BatchHeader BATCH2 Batches messages near the top of the stack.BATCH2.Batch2Header BatchBundler Bundler based onBATCH.BPING Broadcast PING.CENTRAL_LOCK Deprecated. See http://belaban.blogspot.com/2020/11/i-hate-distributed-locks.html.CENTRAL_LOCK2 Deprecated. See http://belaban.blogspot.com/2020/11/i-hate-distributed-locks.html.CertficateCNMatcher Sample implementation ofSSL_KEY_EXCHANGE.SessionVerifierCLEAR_FLAGS Protocol which clears the given flags in the down direction for all messagesCOMPRESS Compresses the payload of a message.COMPRESS.CompressHeader COUNTER Protocol which is used byCounterServiceto provide a distributed atomic counterCOUNTER.AddAndGetRequest COUNTER.CompareAndSetRequest COUNTER.CounterHeader COUNTER.CounterViewImpl COUNTER.DeleteRequest COUNTER.ExceptionResponse COUNTER.GetOrCreateRequest COUNTER.ReconcileRequest COUNTER.ReconcileResponse COUNTER.RequestCompletableFuture<T> COUNTER.ResendPendingRequests COUNTER.Response<T> COUNTER.ResponseData<T> COUNTER.SetRequest COUNTER.SimpleRequest COUNTER.SyncCounterImpl COUNTER.UpdateFunctionRequest<T extends Streamable> COUNTER.UpdateFunctionResponse<T extends Streamable> COUNTER.UpdateRequest COUNTER.UpdateResult<T extends Streamable> COUNTER.ValueResponse COUNTER.VersionedValue DAISYCHAIN Implementation of daisy chaining.DAISYCHAIN.DaisyHeader DELAY 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).DETECT_LOOPBACKS Detects unicast loopbacks: messages where dest == local addressDH_KEY_EXCHANGE 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.DH_KEY_EXCHANGE.DhHeader DISCARD 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.DISCARD_PAYLOAD Discards a message whose sequence number (in the payload, as a Long) matches seqno 2 times, before passing it down.DISCARD.MyCheckBox Discovery The Discovery protocol retrieves the initial membership (used by GMS and MERGE3) by sending discovery requests.DROP Protocol which drops up or down messages according to user-defined filtersDUPL Duplicates outgoing or incoming messages by copying themEncrypt<E extends java.security.KeyStore.Entry> Super class of symmetric (SYM_ENCRYPT) and asymmetric (ASYM_ENCRYPT) encryption protocols.EncryptHeader EXAMPLE Example of a protocol layer.EXAMPLE.ExampleHeader FailureDetection FailureDetection.HeartbeatHeader FcHeader Header used by various flow control protocolsFD_ALL Failure detection based on simple heartbeat protocol.FD_ALL2 Failure detection based on simple heartbeat protocol.FD_ALL3 Failure detection based on simple heartbeat protocol.FD_ALL3.Bitmap FD_HOST Failure detection protocol which detects the crash or hanging of entire hosts and suspects all cluster members on those hosts.FD_HOST.CommandExecutor2 FD_HOST.ExternalPingCommand FD_HOST.IsReachablePingCommand FD_SOCK Failure detection protocol based on sockets.FD_SOCK.ClientConnectionHandler Handles a client connection; multiple client can connect at the same timeFD_SOCK.FdHeader FD_SOCK2 Failure detection protocol based on TCP connections, successor toFD_SOCK.FD_SOCK2.FdHeader FD_SOCK2.PingDest FD_SOCK2.Request FILE_PING Simple discovery protocol which uses a file on shared storage such as an SMB share, NFS mount or S3.FlowControl Simple flow control protocol based on a credit system.FORK The FORK protocol; multiplexes messages to different forks in a stack (https://issues.redhat.com/browse/JGRP-1613).FORK.ForkHeader FRAG Fragmentation layer.FRAG.FragmentationList A fragmentation list keeps a list of fragmentation tables sorted by an Address ( the sender ).FRAG.FragmentationTable Keeps track of the fragments that are received.FRAG.FragmentationTable.FragEntry inner class represents an entry for a message each entry holds an array of byte arrays sorted once all the byte buffer entries have been filled the fragmentation is considered complete.FRAG2 Fragmentation layer.FRAG2.FragEntry Class represents an entry for a message.FRAG3 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.Frag3Header FRAG4 Fragmentation layer.FragHeader Fragmentation Base class for all fragmentation protocols.HDRS Prints the headers of all sent or received messagesINJECT_VIEW Simple protocol to inject an arbitrary view on one or more cluster nodes.JDBC_PING Discovery protocol using a JDBC connection to a shared database.KeyExchange 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.LOCAL_PING Discovery protocol for finding members in the local process only.Locking Deprecated. See http://belaban.blogspot.com/2020/11/i-hate-distributed-locks.html.Locking.LockInfoResponse Locking.LockingHeader Locking.Request Locking.Response A response to a request, to be sent back to the requester as a messageMAKE_BATCH Intercepts individual up messages and creates batches from them, passing the batches up.MERGE3 Protocol to discover subgroups; e.g., existing due to a network partition (that healed).MERGE3.MergeHeader MFC Simple flow control protocol based on a credit system.MFC_NB Non-blocking alternative toMFC.
JIRA: JIRA: https://issues.redhat.com/browse/JGRP-2172MPING Uses its own IP multicast socket to send and receive discovery requests/responses.MsgStats Class which has all the stats about received/sent messages etc (in TP)NoBundler Bundler which doesn't bundle :-) Can be used to measure the diff between bundling and non-bundling (e.g.PDC Persistent Discovery Cache.PDC.Mapping PERF Protocol measuring latency between stacks.PERF.PerfHeader PING The PING protocol retrieves the initial membership by mcasting a discovery request (via the multicast capable transport) to all current cluster membersPingData Encapsulates information about a cluster node, e.g.PingHeader Used to send discovery requests and responsesRACKSPACE_PING Discovery protocol based on Rackspace Cloud Files storage solutionRACKSPACE_PING.RackspaceClient A thread safe Rackspace ReST clientRATE_LIMITER Protocol which sends at most max_bytes in time_period milliseconds.RED Implementation of Random Early Drop: messages are discarded when the bundler's queue in the transport nears exhaustion.RemoveQueueBundler Bundler implementation which sends message batches (or single messages) as soon as the remove queue is full (or max_bundler_size would be exceeded).
Messages are removed from the main queue and processed as follows (assuming they all fit into the remove queue):
A B B C C A causes the following sends: {AA} -> {CC} -> {BB}
Note that null is also a valid destination (send-to-all).
Contrary toTransferQueueBundler, this bundler uses aRingBufferrather than an ArrayBlockingQueue and the size of the remove queue is fixed.REVERSE Reverses the next N messages that are received.RingBufferBundler Bundler which usesRingBufferto store messages.RingBufferBundlerLockless Bundler which doesn't use locks but relies on CAS.RingBufferBundlerLockless2 Lockless bundler using a reader thread which is unparked by (exactly one) writer thread.RSVP Protocol which implements synchronous messages (https://issues.redhat.com/browse/JGRP-1389).RSVP.Entry RSVP.RsvpHeader RTTHeader Header to measure round-trip times (in nanoseconds) for sync RPCs (https://issues.redhat.com/browse/JGRP-2604)SenderSendsBundler SEQUENCER Implementation of total order protocol using a sequencer.SEQUENCER.SequencerHeader SEQUENCER2 Implementation of total order protocol using a sequencer_uum.SEQUENCER2.SequencerHeader SERIALIZE Serializes the entire message (including payload, headers, flags and destination and src) into the payload of another message that's then sent.SHARED_LOOPBACK Loopback transport shared by all channels within the same VM.SHARED_LOOPBACK_PING Discovery protocol running overSHARED_LOOPBACKonly.SHUFFLE Reorders messages by buffering them and shuffling the result after TIMEOUT ms.SimpleTCP Bare-bones thread-per-connection TCP-based transport.SimplifiedTransferQueueBundler This bundler uses the same logic asTransferQueueBundlerbut does not allocate memory except for the buffer itself and does not use complex data structures.SIZE Protocol which prints out the real size of a message.SNIFF Protocol trying to print message payloads as stringsSOS Periodically fetches some attributes and writes them to a file (https://issues.redhat.com/browse/JGRP-2402)SSL_KEY_EXCHANGE Key exchange based on SSL sockets.STATS Provides various statsSTOMP Protocol which provides STOMP (http://stomp.codehaus.org/) support.STOMP.Frame STOMP.StompHeader SWIFT_PING Discovery protocol based on Openstack Swift (object storage).SWIFT_PING.ConnBuilder Build HttpURLConnections with adequate headers and methodSWIFT_PING.Credentials Result of a successfully authenticated sessionSWIFT_PING.HttpHeaders SWIFT_PING.HttpResponse Response for a Swift API callSWIFT_PING.Keystone_V_2_0_Auth Openstack Keytsone v2.0 authentication provider.SWIFT_PING.SwiftClient A thread safe Swift clientSWIFT_PING.Utils SYM_ENCRYPT Encrypts and decrypts communication in JGroups by using a secret key shared by all cluster members.TCP TCP based protocol.TCP_NIO2 Protocol using TCP/IP to send and receive messages.TCPGOSSIP The TCPGOSSIP protocol layer retrieves the initial membership (used by GMS when started by sending event FIND_INITIAL_MBRS down the stack).TCPPING The TCPPING protocol defines a static cluster membership.TIME Protocol measuring delivery times.TP Generic transport - specific implementations should extend this abstract class.TpHeader Generic transport header, used by TP.TRACE TransferQueueBundler 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.TransferQueueBundler2 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.TransferQueueBundler2.Buffer TUNNEL Replacement for UDP.UDP IP multicast transport based on UDP.UFC Simple flow control protocol based on a credit system.UFC_NB Non-blocking alternative toUFC.
JIRA: https://issues.redhat.com/browse/JGRP-2172UNICAST3 Reliable unicast protocol using a combination of positive and negative acks.UnicastHeader3 Moved out ofUNICAST3into separate class.VERIFY_SUSPECT Catches SUSPECT events traveling up the stack.VERIFY_SUSPECT.Entry VERIFY_SUSPECT.VerifyHeader VERIFY_SUSPECT2 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.txtVERIFY_SUSPECT2.Entry VERIFY_SUSPECT2.VerifyHeader -
Enum Summary Enum Description ASYM_ENCRYPT.Processing COUNTER.RequestType COUNTER.ResponseType DH_KEY_EXCHANGE.Type DUPL.Direction FD_SOCK2.Request.Type FD_SOCK2.State Locking.Type MERGE3.MergeHeader.Type SSL_KEY_EXCHANGE.Type STOMP.ClientVerb STOMP.ServerVerb STOMP.StompHeader.Type SWIFT_PING.AUTH_TYPE Supported Swift authentication providersUNICAST3.State