A concurrent and highly performant Java manager composed of many ConcurrentLinkedDeque
, each deque mapped by a key. All deques are completely transparent to the client.
Next stop, read JavaDoc of:
./src/main/java/martinandersson/com/lib/concurrent/ConcurrentDequeManager.java
- Awesome API. For example:
long initialPosition = manager.addLast("BID Ipads", 10_000);
Optional<Integer> matched = manager.removeFirstIf("BID Ipads", Predicate.isEqual(10_000));
- Amount of deques grow and shrink on demand.
- Elements may optionally receive position change notifications if they implement
ConcurrentDequeManager.PositionAware
. - Lock-free.
- Querying the size of a deque is almost a constant-time operation (internally tracked with a
LongAdder
).
- martinandersson.com/livechat/: Used as a web user queue system when I am too busy or not online.