public final class RingBuffer<T> extends Object
| Constructor and Description |
|---|
RingBuffer(int capacity,
EventFactory<T> factory) |
| Modifier and Type | Method and Description |
|---|---|
T |
get(int sequence) |
int |
nextReadIndex() |
int |
nextWriteIndex() |
void |
publishReadIndex(int sequence) |
void |
publishWriteIndex(int sequence) |
int |
tryNextReadIndex() |
int |
tryNextWriteIndex() |
public RingBuffer(int capacity,
EventFactory<T> factory)
public int nextWriteIndex()
throws InterruptedException
InterruptedExceptionpublic int tryNextWriteIndex()
throws InterruptedException
InterruptedExceptionpublic void publishWriteIndex(int sequence)
public T get(int sequence)
public int tryNextReadIndex()
public int nextReadIndex()
throws InterruptedException
InterruptedExceptionpublic void publishReadIndex(int sequence)
Copyright © 2020. All rights reserved.