Package org.agrona.concurrent
package org.agrona.concurrent
Concurrent data structures and utilities that support both on and off Java heap usage.
-
ClassDescriptionLeft over immutable queue fields.Values for the consumer that are expected to be padded.Pad out a cacheline to the left of a producer fields to prevent false sharing.Pad out a cacheline between the producer and consumer fields to prevent false sharing.Pad out a cacheline between the producer and consumer fields to prevent false sharing.Value for the producer that are expected to be padded.An Agent is scheduled to do work on a thread on a duty cycle.
Agent
container which does not start a thread.Thrown to terminate the work/duty cycle of anAgent
.Abstraction over a range of buffer types that allows type to be accessed with various memory ordering semantics.Idling strategy for threads when they have no work to do.Busy spin strategy targeted at lowest possible latency.AnEpochClock
that caches a timestamp which can be updated withCachedEpochClock.update(long)
.Pad out a cacheline to the left of a value to prevent false sharing.Value for the sequence that is expected to be padded.ANanoClock
that caches a timestamp which can be updated withCachedNanoClock.update(long)
.Pad out a cacheline to the left of a value to prevent false sharing.Value for the sequence that is expected to be padded.Group severalAgent
s into one composite, so they can be scheduled as a unit.IdleStrategy
which can be controlled by a counter so its mode of operation can be switched between doing nothing (NOOP), busy spinning by callingThread.onSpinWait()
, yielding by callingThread.yield()
, or sleeping for the minimum period by callingLockSupport.parkNanos(long)
when work count is zero, so it idles.Callback interface for processing of messages that are read from a buffer.Action to be taken on return fromControlledMessageHandler.onMessage(int, MutableDirectBuffer, int, int)
.AnErrorHandler
which callsAtomicCounter.increment()
before delegating the exception.Group severalAgent
s into one composite, so they can be scheduled as a unit.Enum
to indicate the current status of aDynamicCompositeAgent
.Retrieves the number of milliseconds since 1 Jan 1970 UTC.Clock representing the time in microseconds since 1 Jan 1970 UTC.Clock representing the time in nanoseconds since 1 Jan 1970 UTC.Clock that provides the number of time units since the 1 Jan 1970 UTC.Control the use of high-resolution timers on Windows by a bit of hackery.Generates unique identifiers that fit in a 64-bit word.Idle strategy for use by threads when they do not have work to do.Many producer to many consumer concurrent queue that is array backed.Many producer to one consumer concurrent queue that is array backed.Concurrent linkedQueue
that can be used from many producers and a single consumer.Value for the head that is expected to be padded.Pad out a cache line to the left of a tail to prevent false sharing.Pad out a cache line between the tail and the head to prevent false sharing.Value for the tail that is expected to be padded.Callback interface for processing of messages that are read from a buffer.Functional interface for return the current time as system-wide monotonic tick of 1 nanosecond precision.Low-latency idle strategy to be employed in loops that do significant work on each iteration such that any work in the idle strategy would be wasteful.ALock
implementation that is a no operation, i.e.An accurate, zero-gc, pure-java,EpochNanoClock
that calculates an initial epoch nano time based onSystem.currentTimeMillis()
and then uses that offset to adjust the return value ofSystem.nanoTime()
to the UNIX epoch.One producer to one consumer concurrent queue that is array backed.Pipe<E>A container for items exchanged from producers to consumers.QueuedPipe<E>One time barrier for blocking one or more threads until a SIGINT or SIGTERM signal is received from the operating system or by programmatically callingShutdownSignalBarrier.signal()
.Utility to allow the registration of a SIGINT handler that hides the unsupportedjdk.internal.misc.Signal
class.When idle this strategy is to sleep for a specified period in nanoseconds.When idle this strategy is to sleep for a specified period time in milliseconds.Generate unique identifiers based on the Twitter Snowflake algorithm.Implementation that callsSystem.currentTimeMillis()
.Implementation that callsHighResolutionClock.epochMicros()
.Implementation that callsHighResolutionClock.epochNanos()
.ANanoClock
the delegates toSystem.nanoTime()
.Supports regular, byte ordered, and atomic (memory ordered) access to an underlying buffer.IdleStrategy
that will callThread.yield()
when the work count is zero.