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
IOException
public void read(ObjectDataInput in) throws IOException
IOException
public TaskRingBuffer.DurableIterator iterator()
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.