put(Object) and another thread to call poll(). Multiple threads must
not call these methods.
| Modifier and Type | Field and Description |
|---|---|
| private final AtomicReferenceArray | |
| private final AtomicInteger | |
| private final AtomicInteger |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| public T | |
| public boolean |
| queue | back to summary |
|---|---|
| private final AtomicReferenceArray<T> queue | |
| readIndex | back to summary |
|---|---|
| private final AtomicInteger readIndex | |
| writeIndex | back to summary |
|---|---|
| private final AtomicInteger writeIndex | |
| AtomicQueue | back to summary |
|---|---|
| public AtomicQueue(int capacity) | |
| next | back to summary |
|---|---|
| private int next(int idx) | |
| poll | back to summary |
|---|---|
public T poll()
| |
| put | back to summary |
|---|---|
| public boolean put(T value) | |