com.hazelcast.map.impl.mapstore
Interface MapDataStore<K,V>

Type Parameters:
K - type of key to store.
V - type of value to store.
All Known Implementing Classes:
AbstractMapDataStore, WriteBehindStore, WriteThroughStore

public interface MapDataStore<K,V>

Map data stores general contract. Provides an extra abstraction layer over write-through and write-behind map-store implementations.


Method Summary
 V add(K key, V value, long now)
           
 V addBackup(K key, V value, long now)
           
 void addTransient(K key, long now)
           
 void clear()
          Clears resources of this map-data-store.
 Collection<Data> flush()
          Flushes all keys in this map-store.
 V flush(K key, V value, long now, boolean backup)
          Flushes the supplied key to the map-store.
 boolean isPostProcessingMapStore()
           
 V load(K key)
           
 boolean loadable(K key)
           
 Map loadAll(Collection keys)
           
 int notFinishedOperationsCount()
           
 void remove(K key, long now)
           
 void removeAll(Collection keys)
          Removes keys from map store.
 void removeBackup(K key, long now)
           
 

Method Detail

add

V add(K key,
      V value,
      long now)

addTransient

void addTransient(K key,
                  long now)

addBackup

V addBackup(K key,
            V value,
            long now)

remove

void remove(K key,
            long now)

removeBackup

void removeBackup(K key,
                  long now)

clear

void clear()
Clears resources of this map-data-store.


load

V load(K key)

loadAll

Map loadAll(Collection keys)

removeAll

void removeAll(Collection keys)
Removes keys from map store. It also handles Data to object conversions of keys.

Parameters:
keys - to be removed.

loadable

boolean loadable(K key)

notFinishedOperationsCount

int notFinishedOperationsCount()

isPostProcessingMapStore

boolean isPostProcessingMapStore()

flush

Collection<Data> flush()
Flushes all keys in this map-store.

Returns:
flushed Data keys list.

flush

V flush(K key,
        V value,
        long now,
        boolean backup)
Flushes the supplied key to the map-store.

Parameters:
key - key to be flushed
value - value to be flushed
now - now in millis
backup - true calling this method for backup partition, false for owner partition.
Returns:
flushed value.


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.