public class WriteThroughStore extends AbstractMapDataStore<Data,Object>
nodeEngine| Constructor and Description |
|---|
WriteThroughStore(MapStoreContext mapStoreContext) |
| Modifier and Type | Method and Description |
|---|---|
Object |
add(Data key,
Object value,
long expirationTime,
long time,
UUID transactionId) |
Object |
addBackup(Data key,
Object value,
long expirationTime,
long time,
UUID transactionId) |
void |
addForcibly(DelayedEntry delayedEntry)
Adds delayed-entry without doing capacity checks.
|
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)
Used in
IMap.loadAll(boolean) calls. |
int |
notFinishedOperationsCount() |
void |
remove(Data key,
long time,
UUID transactionId) |
void |
removeBackup(Data key,
long time,
UUID transactionId) |
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. |
getStore, getTxnReservedCapacityCounter, getUserExpirationTime, isPostProcessingMapStore, isWithExpirationTime, loadAll, removeAll, toHeapData, toObjectpublic WriteThroughStore(MapStoreContext mapStoreContext)
public void addForcibly(DelayedEntry delayedEntry)
MapDataStorepublic void addTransient(Data key, long now)
public Object addBackup(Data key, Object value, long expirationTime, long time, UUID transactionId)
public void reset()
MapDataStorepublic boolean loadable(Data key)
MapDataStoreIMap.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 nottrue if the key is loadablepublic long softFlush()
MapDataStoreMapDataStore 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.MapFlushOperationpublic void hardFlush()
MapDataStore
After calling of this method, all elements in the 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)
MapDataStorekey - key to be flushedvalue - value to be flushedbackup - true calling this method for
backup partition, false for owner partition.public int notFinishedOperationsCount()
Copyright © 2019 Hazelcast, Inc.. All rights reserved.