|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hazelcast.map.impl.mapstore.AbstractMapDataStore<Data,Object> com.hazelcast.map.impl.mapstore.writebehind.WriteBehindStore
public class WriteBehindStore
TODO Holds current write behind state and should be included in migrations. Write behind map data store implementation. Created per every record-store. So only called from one-thread.
Constructor Summary | |
---|---|
WriteBehindStore(MapStoreWrapper store,
SerializationService serializationService,
long writeDelayTime,
int partitionId)
|
Method Summary | |
---|---|
Object |
add(Data key,
Object value,
long now)
|
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,
long now,
boolean backup)
Flushes the supplied key to the map-store. |
AtomicInteger |
getFlushCounter()
|
WriteBehindQueue<DelayedEntry> |
getWriteBehindQueue()
|
Object |
load(Data key)
|
boolean |
loadable(Data key,
long lastUpdateTime,
long now)
* 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 |
removeFromStagingArea(Data key)
|
void |
removeFromStagingArea(Data key,
Object value)
|
void |
removeFromWaitingDeletions(Data key)
|
void |
setWriteBehindProcessor(WriteBehindProcessor writeBehindProcessor)
|
void |
setWriteBehindQueue(WriteBehindQueue<DelayedEntry> writeBehindQueue)
|
Methods inherited from class com.hazelcast.map.impl.mapstore.AbstractMapDataStore |
---|
convertToObjectKeys, getStore, isPostProcessingMapStore, removeAll, toData, toObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WriteBehindStore(MapStoreWrapper store, SerializationService serializationService, long writeDelayTime, int partitionId)
Method Detail |
---|
public void setWriteBehindQueue(WriteBehindQueue<DelayedEntry> writeBehindQueue)
public Object add(Data key, Object value, long now)
public void addTransient(Data key, long now)
public Object addBackup(Data key, Object value, long time)
public void remove(Data key, long now)
public void removeBackup(Data key, long time)
public void clear()
MapDataStore
public Object load(Data key)
public Map loadAll(Collection keys)
loadAll
in interface MapDataStore<Data,Object>
loadAll
in class AbstractMapDataStore<Data,Object>
public boolean loadable(Data key, long lastUpdateTime, long now)
IMap.loadAll(boolean)
calls.
If write-behind map-store feature enabled, some things may lead possible data inconsistencies.
These are:
- calling evict/evictAll.
- calling remove.
- not yet stored write behind queue operation.
With this method we can be sure that a key can be loadable from map-store or not.
key
- to query whether loadable or not.lastUpdateTime
- last update time.now
- in mills
true
if loadable, otherwise false.public int notFinishedOperationsCount()
public Object flush(Data key, Object value, long now, boolean backup)
MapDataStore
key
- key to be flushedvalue
- value to be flushednow
- now in millisbackup
- true
calling this method for backup partition, false
for owner partition.
public Collection<Data> flush()
MapDataStore
Data
keys list.public void removeFromWaitingDeletions(Data key)
public void removeFromStagingArea(Data key, Object value)
public void removeFromStagingArea(Data key)
public WriteBehindQueue<DelayedEntry> getWriteBehindQueue()
public void setWriteBehindProcessor(WriteBehindProcessor writeBehindProcessor)
public AtomicInteger getFlushCounter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |