public class RingbufferContainer extends Object implements DataSerializable
Constructor and Description |
---|
RingbufferContainer(RingbufferConfig config,
SerializationService serializationService) |
RingbufferContainer(String name) |
RingbufferContainer(String name,
RingbufferConfig config,
SerializationService serializationService) |
Modifier and Type | Method and Description |
---|---|
long |
add(Data item) |
long |
addAll(Data[] items) |
void |
checkBlockableReadSequence(long readSequence) |
void |
cleanup()
Cleans up the ringbuffer by deleting all expired items.
|
int |
getCapacity() |
RingbufferConfig |
getConfig() |
RingbufferWaitNotifyKey |
getRingEmptyWaitNotifyKey() |
long |
headSequence() |
void |
init(NodeEngine nodeEngine) |
boolean |
isEmpty() |
Data |
read(long sequence) |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
long |
readMany(long beginSequence,
ReadResultSetImpl result) |
long |
remainingCapacity() |
void |
setHeadSequence(long sequence) |
boolean |
shouldWait(long sequence) |
long |
size() |
long |
tailSequence() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public RingbufferContainer(String name)
public RingbufferContainer(RingbufferConfig config, SerializationService serializationService)
public RingbufferContainer(String name, RingbufferConfig config, SerializationService serializationService)
public void init(NodeEngine nodeEngine)
public RingbufferWaitNotifyKey getRingEmptyWaitNotifyKey()
public RingbufferConfig getConfig()
public long tailSequence()
public long headSequence()
public void setHeadSequence(long sequence)
public int getCapacity()
public long size()
public boolean isEmpty()
public boolean shouldWait(long sequence)
public long remainingCapacity()
public void checkBlockableReadSequence(long readSequence)
public long add(Data item)
public long addAll(Data[] items)
public Data read(long sequence)
public long readMany(long beginSequence, ReadResultSetImpl result)
beginSequence
- the sequence of the first item to read.result
- the List where the result are stored in.public void cleanup()
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.