public class WriteThroughStore extends AbstractMapDataStore<Data,Object>
Constructor and Description |
---|
WriteThroughStore(MapStoreWrapper store,
InternalSerializationService serializationService) |
Modifier and Type | Method and Description |
---|---|
Object |
add(Data key,
Object value,
long time) |
Object |
addBackup(Data key,
Object value,
long time) |
void |
addTransient(Data key,
long now) |
Object |
flush(Data key,
Object value,
boolean backup)
Flushes the supplied key to the map-store.
|
void |
hardFlush()
Flushes write-behind-queue into map-store in calling thread.
|
Object |
load(Data key) |
boolean |
loadable(Data key) |
int |
notFinishedOperationsCount() |
void |
remove(Data key,
long time) |
void |
removeBackup(Data key,
long time) |
void |
reset()
Returns all associated resources of this map-data-store back to the initial state.
|
long |
softFlush()
Only marks this
MapDataStore as flush-able. |
convertToObjectKeys, getStore, isPostProcessingMapStore, loadAll, removeAll, toHeapData, toObject
public WriteThroughStore(MapStoreWrapper store, InternalSerializationService serializationService)
public void addTransient(Data key, long now)
public void remove(Data key, long time)
public void removeBackup(Data key, long time)
public void reset()
MapDataStore
public boolean loadable(Data key)
public long softFlush()
MapDataStore
MapDataStore
as flush-able. Flush means storing entries from write-behind-queue into map-store
regardless of the scheduled store-time. Actual flushing is done by another thread than partition-operation thread
which runs StoreWorker
.MapFlushOperation
public void hardFlush()
MapDataStore
WriteBehindQueue
of this MapDataStore
should be in map-store regardless of the scheduled store-time.
The only call to this method is in node-shutdown.MapManagedService.shutdown(boolean)
public Object flush(Data key, Object value, boolean backup)
MapDataStore
key
- key to be flushedvalue
- value to be flushedbackup
- true
calling this method for backup partition, false
for owner partition.public int notFinishedOperationsCount()
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.