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 TUNNEL.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.CertficateCNMatcher Sample implementation ofSSL_KEY_EXCHANGE.SessionVerifier
CLEAR_FLAGS Protocol which clears a set of flags in the down or up direction for all messagesCOMPRESS Compresses the payload of a message.COMPRESS.CompressHeader COUNTER Protocol which is used byCounterService
to provide a distributed atomic counterCOUNTER.AddAndGetRequest COUNTER.CompareAndSetRequest COUNTER.CounterHeader COUNTER.DeleteRequest COUNTER.ExceptionResponse COUNTER.GetOrCreateRequest COUNTER.ReconcileRequest COUNTER.ReconcileResponse COUNTER.ResendPendingRequests COUNTER.SetRequest COUNTER.SimpleRequest COUNTER.UpdateRequest 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.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.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.JDBC_PING2 New version ofJDBC_PING
.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.MAKE_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.NAKACK3 Negative AcKnowledgement layer (NAKs).NAKACK4 New multicast protocols based on fixed-size xmit windows and message ACKsDetails: https://issues.redhat.com/browse/JGRP-2780 NakAckHeader NoBundler Bundler which doesn't bundle :-) Can be used to measure the diff between bundling and non-bundling (e.g.NON_BLOCKING_SENDS Detects sends during processing of incoming messages and sets flagMessage.TransientFlag.DONT_BLOCK
to prevent blocking the incoming thread on a send.
JIRA: https://issues.redhat.com/browse/JGRP-2772PDC Persistent Discovery Cache.PDC.Mapping PerDestinationBundler Queues messages per destination ('null' is a special destination), sending when the last sender thread to the same destination returns or max_size has been reached.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 responsesProtPerfHeader RACKSPACE_PING Discovery protocol based on Rackspace Cloud Files storage solutionRACKSPACE_PING.RackspaceClient A thread safe Rackspace ReST clientRATE Measures incoming and outgoing rates: messages/sec, bytes/sec.RATE_LIMITER Protocol which sends at most max_bytes in time_period milliseconds.RATE_LIMITER2 Rate limiter based credits (max_bytes).RED Implementation of Random Early Drop: messages are discarded when the bundler's queue in the transport nears exhaustion.ReliableMulticast Base class for reliable multicast protocolsRemoveQueueBundler 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 aRingBuffer
rather than an ArrayBlockingQueue and the size of the remove queue is fixed.REVERSE Reverses the next N messages that are received.RingBufferBundler Bundler which usesRingBuffer
to 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_LOOPBACK
only.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 asTransferQueueBundler
but 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 (https://stomp.github.io/) support.STOMP.Frame STOMP.StompHeader SWIFT_PING Discovery protocol based on Openstack Swift (object storage).SWIFT_PING.SwiftClient A thread safe Swift clientSYM_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.THREAD_COUNT Maintains averages of up- and down-threadsTIME 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.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-2172UNBATCH InterceptsProtocol.up(MessageBatch)
and passes up each message of a message batch as a single message.UNICAST3 Reliable unicast protocol using a combination of positive and negative acks.UnicastHeader3 Moved out ofUNICAST3
into 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