public class WriteBehindStore extends AbstractMapDataStore<Data,Object>
| Constructor and Description |
|---|
WriteBehindStore(MapStoreWrapper store,
SerializationService serializationService,
int partitionId,
InMemoryFormat inMemoryFormat,
boolean coalesce) |
| Modifier and Type | Method and Description |
|---|---|
Object |
add(Data key,
Object value,
long now) |
void |
add(DelayedEntry<Data,Object> delayedEntry) |
Object |
addBackup(Data key,
Object value,
long time) |
void |
addTransient(Data key,
long now) |
void |
clear()
Clears resources of this map-data-store.
|
Collection<Data> |
flush()
Flushes all keys in this map-store.
|
Object |
flush(Data key,
Object value,
boolean backup)
Flushes the supplied key to the map-store.
|
AtomicInteger |
getFlushCounter() |
WriteBehindQueue<DelayedEntry> |
getWriteBehindQueue() |
Object |
load(Data key) |
boolean |
loadable(Data key)
* Used in
IMap.loadAll(boolean) calls. |
Map |
loadAll(Collection keys) |
int |
notFinishedOperationsCount() |
void |
remove(Data key,
long now) |
void |
removeBackup(Data key,
long time) |
void |
setWriteBehindProcessor(WriteBehindProcessor writeBehindProcessor) |
void |
setWriteBehindQueue(WriteBehindQueue<DelayedEntry> writeBehindQueue) |
convertToObjectKeys, getStore, isPostProcessingMapStore, removeAll, toData, toObjectpublic WriteBehindStore(MapStoreWrapper store, SerializationService serializationService, int partitionId, InMemoryFormat inMemoryFormat, boolean coalesce)
public void add(DelayedEntry<Data,Object> delayedEntry)
public void addTransient(Data key, long now)
public void remove(Data key, long now)
public void removeBackup(Data key, long time)
public void clear()
MapDataStorepublic Map loadAll(Collection keys)
loadAll in interface MapDataStore<Data,Object>loadAll in class AbstractMapDataStore<Data,Object>public boolean loadable(Data key)
IMap.loadAll(boolean) calls.
If the write-behind map-store feature is enabled, some things may lead to possible data inconsistencies.
These are:
- calling evict/evictAll,
- calling remove, and
- not yet stored write-behind queue operations.
With this method, we can be sure if a key can be loadable from map-store or not.key - the key to query whether it is loadable or not.true if loadable, false otherwise.public int notFinishedOperationsCount()
public Object flush(Data key, Object value, boolean backup)
MapDataStorekey - key to be flushedvalue - value to be flushedbackup - true calling this method for backup partition, false for owner partition.public Collection<Data> flush()
MapDataStoreData keys list.public WriteBehindQueue<DelayedEntry> getWriteBehindQueue()
public void setWriteBehindQueue(WriteBehindQueue<DelayedEntry> writeBehindQueue)
public void setWriteBehindProcessor(WriteBehindProcessor writeBehindProcessor)
public AtomicInteger getFlushCounter()
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.