public final class RingbufferStoreWrapper extends Object implements RingbufferStore<Data>
Modifier and Type | Method and Description |
---|---|
static RingbufferStoreWrapper |
create(ObjectNamespace namespace,
RingbufferStoreConfig storeConfig,
InMemoryFormat inMemoryFormat,
SerializationService serializationService,
ClassLoader classLoader)
Factory method that creates a
RingbufferStoreWrapper . |
long |
getLargestSequence()
Return the largest sequence seen by the data store.
|
boolean |
isEnabled()
Is the ring buffer store enabled.
|
Data |
load(long sequence)
Loads the value of a given sequence.
|
void |
store(long sequence,
Data value)
Stores one item with it's corresponding sequence.
|
void |
storeAll(long firstItemSequence,
Data[] items)
Stores multiple entries.
|
public static RingbufferStoreWrapper create(ObjectNamespace namespace, RingbufferStoreConfig storeConfig, InMemoryFormat inMemoryFormat, SerializationService serializationService, ClassLoader classLoader)
RingbufferStoreWrapper
. It attempts to create the ring buffer store from several
sources :
namespace
- ring buffer namespacestoreConfig
- store config of ring bufferinMemoryFormat
- the format of the stored items (BINARY, OBJECT or NATIVE). NATIVE format translates into
binary values on the store method calls.serializationService
- serialization service.RingbufferStoreWrapper
public boolean isEnabled()
public void store(long sequence, Data value)
RingbufferStore
store
in interface RingbufferStore<Data>
sequence
- the sequence ID of the datavalue
- the value of the data to storepublic void storeAll(long firstItemSequence, Data[] items)
RingbufferStore
storeAll
in interface RingbufferStore<Data>
firstItemSequence
- the sequence of the first itemitems
- the items that are being storedpublic Data load(long sequence)
RingbufferStore
load
in interface RingbufferStore<Data>
sequence
- the sequence of the requested itempublic long getLargestSequence()
RingbufferStore
getLargestSequence
in interface RingbufferStore<Data>
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.