public class ConcurrentArrayRingbuffer<E> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ConcurrentArrayRingbuffer.RingbufferSlice<E> |
| Constructor and Description |
|---|
ConcurrentArrayRingbuffer(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(E item)
Appends an item to the ring buffer.
|
void |
clear() |
ConcurrentArrayRingbuffer.RingbufferSlice<E> |
copyFrom(long sequence)
Copies all the items from the given
sequence up to the
tail. |
E |
get(long sequence) |
int |
getCapacity() |
boolean |
isEmpty() |
long |
size() |
public void add(E item)
public void clear()
public E get(long sequence)
public ConcurrentArrayRingbuffer.RingbufferSlice<E> copyFrom(long sequence)
sequence up to the
tail. If the item at the sequence number is already dropped, start from
the oldest item.IllegalArgumentException - If the sequence is in the future.public int getCapacity()
public long size()
public boolean isEmpty()
Copyright © 2019 Hazelcast, Inc.. All rights reserved.