Repolode
aeron-io

aeron-io/agrona

Java library of high-performance data structures and utilities such as primitive collections, off-heap buffers, queues and timer wheels.

Stars
3,266
Forks
459
Open issues
8
Last commit
2 days ago

What is it?

Agrona is a Java library of data structures and utility methods for building high-performance applications. It is used by the Aeron message transport, and it supplies the buffer implementations that the Simple Binary Encoding message codec relies on.

The library focuses on avoiding object boxing and garbage collection overhead. It includes int and long primitive lists, maps and sets that use open addressing, a set-associative cache, and lock-free queues. Buffers can wrap on-heap or off-heap memory with memory ordering semantics, and ring and broadcast buffers are implemented off-heap for IPC communication.

Other utilities cover clock abstractions that allow caching and testing, a scalable timer wheel with O(1) register and cancel, a simple agent framework for concurrent services, off-heap counters, a distinct error log, and a Snowflake-style id generator. The project builds with Gradle and targets Java 17 and later.

Key features

  • 01Primitive int and long lists, maps and sets that avoid boxing
  • 02Buffers wrapping on-heap and off-heap memory with memory ordering semantics
  • 03Lock-free queues and off-heap ring and broadcast buffers for IPC
  • 04Scalable timer wheel with O(1) register and cancel
  • 05Off-heap counters and a distinct error log
  • 06Snowflake-style concurrent unique id generator

Use cases

  • Building low-latency Java messaging or trading systems that must limit garbage collection pauses
  • Replacing java.util collections in hot paths that store primitive keys
  • Sharing data between processes through off-heap ring or broadcast buffers
  • Scheduling large numbers of timers with a timer wheel

Quick start

  1. 1

    Install the latest release from Maven Central as a dependency (see the Maven Central link in the README)

  2. 2

    Build the project from source with Gradle

    ./gradlew

Things to know

  • Requires Java 17 or newer to build and use.
  • Provides low-level utilities for high-performance code, so it is aimed at specialised use rather than general application development.

In collections

Topics

FAQ

What is agrona?
Java library of high-performance data structures and utilities such as primitive collections, off-heap buffers, queues and timer wheels. Agrona is a Java library of data structures and utility methods for building high-performance applications. It is used by the Aeron message transport, and it supplies the buffer implementations that the Simple Binary Encoding message codec relies on.
Is agrona free to use? What license does it have?
agrona is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is agrona still maintained?
Actively maintained. The last commit to agrona was on Nov 6, 2026.
What can I use agrona for?
Building low-latency Java messaging or trading systems that must limit garbage collection pauses Replacing java.util collections in hot paths that store primitive keys Sharing data between processes through off-heap ring or broadcast buffers Scheduling large numbers of timers with a timer wheel
How do I install agrona?
Install the latest release from Maven Central as a dependency (see the Maven Central link in the README) Build the project from source with Gradle: ./gradlew
Where can I get agrona?
The source code and installation instructions are on GitHub: https://github.com/aeron-io/agrona

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects

A C library for extremely fast non-cryptographic hashing, producing identical 32, 64 and 128-bit hashes across platforms.

Developer Tools#hash-function#checksum#non-cryptographic
11.4K+9 this week946COtherWell maintainedUpdated 10 days ago