Thread-safe circular buffer in Java

后端 未结 8 1765
不知归路
不知归路 2020-12-08 05:23

Consider a few web server instances running in parallel. Each server holds a reference to a single shared \"Status keeper\", whose role is keeping the last N re

8条回答
  •  醉话见心
    2020-12-08 05:34

    Maybe you want to look at Disruptor - Concurrent Programming Framework.

    • Find a paper describing the alternatives, design and also a performance comparement to java.util.concurrent.ArrayBlockingQueue here: pdf
    • Consider to read the first three articles from BlogsAndArticles

    If the library is too much, stick to java.util.concurrent.ArrayBlockingQueue

提交回复
热议问题