Package org.jgroups.util
Provides useful functionality which cannot be assigned to any particular other package.
-
Interface Summary Interface Description AgeOutCache.Handler<K> Condition FutureListener<T> A listener that is called back when a future is done.MessageIterator NotifyingFuture<T> A sub-interface of a Future, that allows for listeners to be attached so that observers can be notified when the future completes.ProcessingQueue.Handler<T> RequestTable.Visitor<T> ResourceManager.IpAddressRep SizeStreamable Interface implementing Streamable and returning the size of the marshalled object.SocketFactory Factory to create various types of sockets.Streamable Implementations of Streamable can add their state directly to the output stream, enabling them to bypass costly serializationTable.Visitor<T> ThreadFactory TimeScheduler Timer-like interface which allows for execution of tasks.TimeScheduler.Task The interface that dynamic tasks (TimeScheduler.scheduleWithDynamicInterval(org.jgroups.util.TimeScheduler.Task)
) must implement -
Class Summary Class Description AckCollector Collects acks from a number of nodes, waits for all acks.AgeOutCache<K> Cache which removes its elements after a certain timeArrayIterator<T> Iterator over an array of elements of type T.AsciiString Simple string implemented as a byte[] array.Average Maintains an approximation of an average of values.AverageMinMax Measures min and max in addition to averageBase64 Encodes and decodes to and from Base64 notation.Base64.InputStream ABase64.InputStream
will read data from another java.io.InputStream, given in the constructor, and encode/decode to/from Base64 notation on the fly.Base64.OutputStream ABase64.OutputStream
will write data to another java.io.OutputStream, given in the constructor, and encode/decode to/from Base64 notation on the fly.Bits Class (similar to (and partly copied from) java.nio.Bits) containing helper methods to encode variables (e.g.BlockingInputStream Bounded input stream.BoundedHashMap<K,V> Bounded linked hashmap; used by SEQUENCER (and probably soon) FORWARD_TO_COORDBoundedList<T> A bounded subclass of LinkedList, oldest elements are removed once max capacity is exceeded.Buffer Buffer with an offset and length.ByteArrayDataInputStream ImplementsDataInput
over a byte[] buffer.ByteArrayDataOutputStream ImplementsDataOutput
over a byte[] buffer.ByteBufferInputStream Class usingByteBuffer
and implementingDataInput
.ByteBufferOutputStream Class usingByteBuffer
and implementingDataOutput
.ConcurrentLinkedBlockingQueue<T> Attempt at writing a fast transfer queue, which is bounded.ConcurrentLinkedBlockingQueue2<T> Attempt at writing a fast transfer queue, which is bounded.CondVar A condition variable with methods for (timed) waiting and signallingCredit Maintains credits for a unicast destination.CreditMap Maintains credits for senders, when credits fall below 0, a sender blocks until new credits have been received.CustomRejectionPolicy // TODO: Document thisDefaultSocketFactory Default implementation, ignores service namesDefaultThreadFactory Thread factory mainly responsible for naming of threads.Digest A message digest containing - for each member - the highest seqno delivered (hd) and the highest seqno received (hr).Digest.Entry Keeps track of one members plus its highest delivered and received seqnosDirectExecutor ExpiryCache<K> Cache which maintains timestamps for keys, and methods to remove/replace expired keys.ExtendedUUID Subclass ofUUID
accommodating additional data such as a flag and a small hashmap.FixedSizeBitSet Class copied fromBitSet
.FlagsUUID Subclass ofUUID
accommodating additional data such as a flag.ForwardQueue Forwards messages in FIFO order to a destination.GetNetworkInterfaces Lists all network interfaces on a systemHeaders Helper class providing functions to manipulate theMessage.headers
array.ImmutableReference<T> Simple class that holds an immutable reference to another object (or tonull
).InputStreamAdapter ExtendsInputStream
from aByteArrayDataInputStream
.LazyThreadFactory Lazily names threads: whenever the address or cluster name is changed, all threads are renamedLongTuple<V> A tuple with a long (primitive) first valueMatchingPromise<T> A promise which only sets the result if it matches the expected resultMaxOneThreadPerSender MessageProcessingPolicy
which processes regular messages and message batches by assigning a max of 1 thread per message from the same sender.MergeId ID to uniquely identify a mergeMessageBatch Represents a message batch; multiple messages from the same sender to the same receiver(s).MessageCache A cache associating members and messagesMutableDigest A mutable version of Digest.MyReceiver<T> Generic receiver for a JChannelNameCache Maintains the mappings between addresses and logical names (moved out of UUID.cache into a separate class)NonBlockingCredit Non-blocking credit for a unicast destination.
Instead of blocking when insufficient credits are available for sending a message, this class queues the message and sends it at a later time when enough credits have been received to send it.
JIRA: https://issues.jboss.org/browse/JGRP-2172NonBlockingCreditMap ObjectInputStreamWithClassloader OverrideObjectInputStream.resolveClass(java.io.ObjectStreamClass)
using the passed-in classloaderOneTimeAddressGenerator Implementation ofAddressGenerator
which is configured with an initial value, and after that random values are generated.OutputStreamAdapter ExtendsOutputStream
from aByteArrayDataOutputStream
.Owner Represents an 'owner', which is an address and thread IDPaddedAtomicBoolean PaddedAtomicInteger PaddedAtomicLong Copied from http://mechanical-sympathy.blogspot.ch/2011/08/false-sharing-java-7.html.Pool<T> Manages a fixed pool of resources (e.g.Pool.Element<T> ProcessingQueue<T> A queue with many producers and consumers.Profiler WrapsAverageMinMax
and provides an impl ofDiagnosticsHandler.ProbeHandler
.ProgressCheckRejectionPolicy DetectsPromise<T> Allows a thread to submit an asynchronous request and to wait for the result.PropertiesToAsciidoc Iterates over all concrete Protocol classes and creates tables with Protocol's properties.Range RequestTable<T> Table for storing requests associated with monotonically increasing sequence numbers (seqnos).ResourceManager Manages resources such as multicast addresses and multicast ports, and TCP ports.ResponseCollector<T> Similar to AckCollector, but collects responses from cluster members, not just acks.ResponseCollectorTask<T> Task which is seeded with an initial membership.Responses Manages responses for the discovery protocol.Responses.PingDataIterator RingBuffer<T> Ring buffer of fixed capacity designed for multiple writers but only a single reader.RingBufferSeqno<T> Ring buffer, implemented with a circular array.RingBufferSeqnoLockless<T> Ring buffer, implemented with a circular array.RpcStats Keeps track of stats for sync and async unicasts and multicastsRpcStats.Result Rsp<T> Class that represents a response from a communicationRspList<T> Contains responses from all members.Runner Runs a given function in a loop (in a separate thread) until it is stoppedSeqnoList A bitset of missing messages with a fixed size.ShutdownRejectedExecutionHandler ShutdownRejectedExecutionHandler is a decorator RejectedExecutionHandler used in all JGroups ThreadPoolExecutor(s).SizeBoundedQueue<T> Blocking FIFO queue bounded by the max number of bytes of all elements.SizeBoundedQueue.El<T> SslContextFactory SslContextFactory.StateTransferResult Encapsulates the result of a state transfer.SubmitToThreadPool Default message processing policy.SuppressCache<T> Cache which keeps a timestamp and counter for every key.SuppressCache.Value 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.TimeScheduler3 Implementation ofTimeScheduler
.TimeScheduler3.Task TimeService 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.Util Collection of various utility routines that can not be assigned to other classes.UUID Logical address which is unique over space and time.WriteVersionTo Extracts version and codename from pom.xml and writes them to ./classes/JGROUPS_VERSION.propertiesXMLSchemaGenerator Iterates over all concrete Protocol classes and creates XML schema used for validation of configuration files. -
Enum Summary Enum Description MessageBatch.Mode RpcStats.Type StackType SuppressLog.Level TimeScheduler3.TaskType Util.AddressScope -
Exception Summary Exception Description NoProgressException Exception raised when a threadpool rejects jobs but shows no progress.