T
- ring buffer item typepublic interface RingbufferStore<T>
Modifier and Type | Method and Description |
---|---|
long |
getLargestSequence()
Return the largest sequence seen by the data store.
|
T |
load(long sequence)
Loads the value of a given sequence.
|
void |
store(long sequence,
T data)
Stores one item with it's corresponding sequence.
|
void |
storeAll(long firstItemSequence,
T[] items)
Stores multiple items.
|
void store(long sequence, T data)
Ringbuffer
from adding the item. It is the responsibility of the store to
ensure that it keeps consistent with the Ringbuffer and in case
of an exception is thrown, the data is not in the store.sequence
- the sequence ID of the datadata
- the value of the data to storeRingbuffer.add(Object)
,
Ringbuffer.addAsync(Object, com.hazelcast.ringbuffer.OverflowPolicy)
void storeAll(long firstItemSequence, T[] items)
Ringbuffer
from adding any of the items. It is the responsibility of the store
to ensure that it keeps consistent with the Ringbuffer and in case
of an exception is thrown the passed data is not in the store.firstItemSequence
- the sequence of the first itemitems
- the items that are being storedRingbuffer.addAllAsync(java.util.Collection, com.hazelcast.ringbuffer.OverflowPolicy)
T load(long sequence)
sequence
- the sequence of the requested itemRingbuffer.readOne(long)
,
Ringbuffer.readManyAsync(long, int, int, IFunction)
long getLargestSequence()
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.