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 COUNTER.Response FD_HOST.PingCommand Command used to check whether a given host is alive, periodically calledSSL_KEY_EXCHANGE.SessionVerifier TUNNEL.TUNNELPolicy -
Class Summary Class Description ABP Deprecated. Mainly used as a design study of Pluscal / TLA+ABP.ABPHeader 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.jboss.org/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 protocolsBPING Broadcast PING.CENTRAL_EXECUTOR This is a central executor service where each request is sent to the coordinator for either a task or a current waiting thread.CENTRAL_LOCK Implementation of a locking protocol which acquires locks by contacting the coordinator.CENTRAL_LOCK2 Implementation of a locking protocol which acquires locks by asking the coordinator.
Because the coordinator maintains all locks, no total ordering of requests is required.
CENTRAL_LOCK2 has all members send lock and unlock requests to the current coordinator.CertficateCNMatcher Sample implementation ofSSL_KEY_EXCHANGE.SessionVerifier
CLEAR_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 byCounterService
to provide a distributed atomic counterCOUNTER.AddAndGetRequest COUNTER.BooleanResponse COUNTER.CompareAndSetRequest COUNTER.CounterHeader COUNTER.DeleteRequest COUNTER.ExceptionResponse COUNTER.GetOrCreateRequest COUNTER.GetOrCreateResponse COUNTER.ReconcileRequest COUNTER.ReconcileResponse COUNTER.ResendPendingRequests COUNTER.SetRequest COUNTER.SimpleRequest COUNTER.SimpleResponse Response without dataCOUNTER.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).DELIVERY_TIME Protocol measuring delivery times.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 Executing This is the base protocol used for executions.Executing.ExecutorHeader Executing.Owner Executing.Request Executing.RequestWithThread FailureDetection FailureDetection.HeartbeatHeader FcHeader Header used by various flow control protocolsFD Failure detection based on simple heartbeat protocol.FD_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.FdHeader 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.jboss.org/browse/JGRP-1613).FORK.ForkHeader FORWARD_TO_COORD Forwards a message to the current coordinator.FORWARD_TO_COORD.ForwardHeader 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.FRAG3.FragEntry Entry for a full message, received fragments are copied into buffer and set in the bitset of expected frags.Frag3Header FragHeader GOOGLE_PING Deprecated. Use GOOGLE_PING2 instead: https://github.com/jgroups-extras/jgroups-googleHDRS 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 Base locking protocol, handling most of the protocol communication with other instances.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.jboss.org/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)MULTI_PING Protocol to invoke multiple discovery protocols in the same stack.NAMING Maintains mappings between addresses and logical names.NAMING.Header 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 Measures incoming and outgoing rates: messages/sec, bytes/sec.RATE_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.RELAY Deprecated. UseRELAY2
insteadRELAY.RelayHeader RELAY.ViewData Contains local and remote views, and UUID informationRemoveQueueBundler 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.jboss.org/browse/JGRP-1389).RSVP.Entry RSVP.RsvpHeader S3_PING Deprecated. Use NATIVE_S3_PING (https://github.com/jgroups-extras/native-s3-ping) instead.SASL Deprecated. Will be removed in 5.0 (not used anymore)SaslHeader 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 (http://stomp.codehaus.org/) 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.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.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.jboss.org/browse/JGRP-2172UNICAST3 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