tools4j-nobark is a library with low latency zero gc data structures and utilities.
A conflation queue is a queue with a safety mechanism to prevent overflow. Values are enqueued with a conflation key, and if a value with the same key already resides in the queue then the two values will be "conflated". Conflation in the simplest case means that the most recent value survives and replaces older values; some more advanced implementations support merging when conflation occurs.
The loop package provides
interfaces and classes with simple building blocks for event loops based on executable steps. A
Step is quite similar
to a Java Runnable
but it returns a value indicating whether substantial work was performed or not --- based on this
value an IdleStrategy
allows control over how intensively the event loop occupies the CPU.
The code makes use of the @Contended
annotation for
false sharing prevention.
For best performance, this optimisation needs to be unlocked as follows:
java -XX:-RestrictContended ...
dependencies {
compile 'org.tools4j:tools4j-nobark:1.5'
}
<dependency>
<groupId>org.tools4j</groupId>
<artifactId>tools4j-nobark</artifactId>
<version>1.5</version>
</dependency>