Package org.jgroups.util
package org.jgroups.util
Provides useful functionality which cannot be assigned to any particular other package.
-
ClassDescriptionCollects acks from a number of nodes, waits for all acks.AgeOutCache<K>Cache which removes its elements after a certain timeIterator over an array of elements of type T.Simple string implemented as a byte[] array.Used to execute asynchronous tasks, e.g.Maintains an approximation of an average of values.Measures min and max in addition to averageEncodes and decodes to and from Base64 notation.A
Base64.InputStreamwill read data from another java.io.InputStream, given in the constructor, and encode/decode to/from Base64 notation on the fly.ABase64.OutputStreamwill write data to another java.io.OutputStream, given in the constructor, and encode/decode to/from Base64 notation on the fly.ImplementsDataOutputin a generic manner, so that subclasses can implement specific behavior.Class (similar to (and partly copied from) java.nio.Bits) containing helper methods to encode variables (e.g.Bounded input stream.BoundedHashMap<K,V> Bounded linked hashmap; used by SEQUENCERBoundedList<T>A bounded subclass of LinkedList, oldest elements are removed once max capacity is exceeded.Byte array with an offset and length.ImplementsDataInputover a byte[] buffer.ImplementsDataOutputover a byte[] buffer.Class usingByteBufferand implementingDataInput.Class usingByteBufferand implementingDataOutput.Tools to (1) dump all protocols and the names of their attributes (ManagedAttribute) and properties (Property) to file, (2) read from that file ('old) and compare whether old is a proper subset of new, ie.Utility class withCompletableFutureandCompletionStageuseful methods.Attempt at writing a fast transfer queue, which is bounded.Attempt at writing a fast transfer queue, which is bounded.A condition variable with methods for (timed) waiting and signallingMaintains credits for a unicast destination.Maintains credits for senders, when credits fall below 0, a sender blocks until new credits have been received.// TODO: Document thisDefault implementation, ignores service namesThread factory mainly responsible for naming of threads.Delayer<T>Collects actions by key and executes them - if a predicate is true - every N ms.A message digest containing - for each member - the highest seqno delivered (hd) and the highest seqno received (hr).Keeps track of one members plus its highest delivered and received seqnosExpiryCache<K>Cache which maintains timestamps for keys, and methods to remove/replace expired keys.Subclass ofUUIDaccommodating additional data such as a flag and a small hashmap.FastArray<T>SimpleClass copied fromBitSet.Subclass ofUUIDaccommodating additional data such as a flag.Given a class, generates code for getters and setters for all attributes and writes it to stdoutTakes a list of methods to profile and generates the Byteman script from them.Lists all network interfaces on a systemHelper class providing functions to manipulate the headers array inBaseMessage.ExtendsInputStreamfrom aByteArrayDataInputStream.IntHashMap<T>A hashmap where keys have to be ints.Lazily names threads: whenever the address or cluster name is changed, all threads are renamedLongTuple<V>A tuple with a long (primitive) first valueMessageProcessingPolicywhich processes regular messages and message batches by assigning a max of 1 thread per message from the same sender.ID to uniquely identify a mergeRepresents a message batch; multiple messages from the same sender to the same receiver(s).A cache associating members and messagesExtracts all attributes and methods annotated withManagedAttributeand returns them as a map of names associated with [getter-method/description tuples].Address with current time as key.Generates addresses with current time as key.A mutable version of Digest.MyReceiver<T>Generic receiver for a JChannelMaintains the mappings between addresses and logical names (moved out of UUID.cache into a separate class)Non-blocking credit for a unicast destination.Exception raised when a threadpool rejects jobs but shows no progress.OverrideObjectInputStream.resolveClass(java.io.ObjectStreamClass)using the passed-in classloaderWraps a primitive object (e.g.Wraps an object and its serialized form.Implementation ofAddressGeneratorwhich is configured with an initial value, and after that random values are generated.ExtendsOutputStreamfrom aByteArrayDataOutputStream.Represents an 'owner', which is an address and thread IDCopied from http://mechanical-sympathy.blogspot.ch/2011/08/false-sharing-java-7.html.Decorates an output stream (DataOutput) and writes only a subset [start..end] (both indices inclusive) of the original data to the underlying output stream.MessageProcessingPolicywhich passes regular messages and message batches up directly (on the same thread), but passes OOB messages to the thread pool.A queue with many producers and consumers.Maintains averages for time values measured betweenProfiler.start()andProfiler.stop().DetectsPromise<T>Allows a thread to submit an asynchronous request and to wait for the result.Iterates over all concrete Protocol classes and creates tables with Protocol's properties.Ref<T>Keeps a reference to another objectAX509ExtendedKeyManagerwhich uses a @FileWatcherto check for changes.AX509ExtendedTrustManagerwhich uses a @FileWatcherto check for changes.RequestTable<T>Table for storing requests associated with monotonically increasing sequence numbers (seqnos).Manages resources such as multicast addresses and multicast ports, and TCP ports.Representation of an IPv4 addressRepresentation of an IPv6 addressSimilar to AckCollector, but collects responses from cluster members, not just acks.Task which is seeded with an initial membership.Manages responses for the discovery protocol.RingBuffer<T>Ring buffer of fixed capacity designed for multiple writers but only a single reader.Ring buffer, implemented with a circular array.Ring buffer, implemented with a circular array.Keeps track of stats for sync and async unicasts and multicastsRsp<T>Class that represents a response from a communicationRspList<T>Contains responses from all members.Measures round-trip times (RTT) between nodesRuns a given function in a loop (in a separate thread) until it is stoppedPrivileged actions for the package Do not move.A bitset of missing messages with a fixed size.ShutdownRejectedExecutionHandler is a decorator RejectedExecutionHandler used in all JGroups ThreadPoolExecutor(s).Blocking FIFO queue bounded by the max number of bytes of all elements.Interface implementing Streamable and returning the size of the marshalled object.Factory to create various types of sockets.SslContextFactory.Encapsulates the result of a state transfer.Implementations of Streamable can add their state directly to the output stream, enabling them to bypass costly serializationDefault message processing policy.Cache which keeps a timestamp and counter for every key.SuppressLog<T>Log (usingSuppressCache) which suppresses (certain) messages from the same member for a given timeTable<T>A store for elements (typically messages) to be retransmitted or delivered.Common functions for all testsThread pool based onThreadPoolExecutorTimer-like interface which allows for execution of tasks.The interface that dynamic tasks (TimeScheduler.scheduleWithDynamicInterval(org.jgroups.util.TimeScheduler.Task)) must implementImplementation ofTimeScheduler.Provides a coarse grained time service.Triple<V1,V2, V3> Holds 3 values, useful when we have a map with a key, but more than 1 value and we don't want to create a separate holder object for the values, and don't want to pass the values as a list or array.Tuple<V1,V2> Holds 2 values, useful when we have a map with a key, but more than 1 value and we don't want to create a separate holder object for the values, and don't want to pass the values as a list or array.Same asMaxOneThreadPerSender, but for OOB message batches, every message of the batch is passed to the thread pool separately (https://issues.redhat.com/browse/JGRP-2800).Collection of various utility routines that can not be assigned to other classes.Logical address which is unique over space and time.Extracts version and codename from pom.xml and writes them to ./classes/JGROUPS_VERSION.propertiesIterates over all concrete Protocol classes and creates XML schema used for validation of configuration files.