public class TaskRingBuffer extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
TaskRingBuffer.DurableIterator |
| Constructor and Description |
|---|
TaskRingBuffer() |
TaskRingBuffer(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
int |
add(Callable task)
Adds the task to next available spot and returns the sequence corresponding to that spot.
|
void |
dispose(int sequence)
Disposes the sequence
|
TaskRingBuffer.DurableIterator |
iterator() |
void |
read(ObjectDataInput in) |
void |
remove(int sequence)
Removes the task with the given sequence
|
Object |
retrieve(int sequence)
Gets the response
|
void |
write(ObjectDataOutput out) |
public TaskRingBuffer()
public TaskRingBuffer(int capacity)
public int add(Callable task)
task - The taskRejectedExecutionException - if there is not available spot for the taskpublic void remove(int sequence)
sequence - the sequencepublic void dispose(int sequence)
sequence - The sequencepublic Object retrieve(int sequence)
sequence - The sequencepublic void write(ObjectDataOutput out) throws IOException
IOExceptionpublic void read(ObjectDataInput in) throws IOException
IOExceptionpublic TaskRingBuffer.DurableIterator iterator()
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.