com.hazelcast.core
Interface QueueStore<T>

Type Parameters:
T - queue item type
All Known Implementing Classes:
QueueStoreWrapper

public interface QueueStore<T>

QueueStore makes a queue backed by a central data store; such as database, disk, etc.


Method Summary
 void delete(Long key)
          Deletes the entry with a given key from the store.
 void deleteAll(Collection<Long> keys)
          Deletes multiple entries from the store.
 T load(Long key)
          Loads the value of a given key.
 Map<Long,T> loadAll(Collection<Long> keys)
          Loads the given keys.
 Set<Long> loadAllKeys()
          Loads all of the keys from the store.
 void store(Long key, T value)
          Stores the key-value pair.
 void storeAll(Map<Long,T> map)
          Stores multiple entries.
 

Method Detail

store

void store(Long key,
           T value)
Stores the key-value pair.

Parameters:
key - key of the entry to store
value - value of the entry to store

storeAll

void storeAll(Map<Long,T> map)
Stores multiple entries. Implementation of this method can optimize the store operation by storing all entries in one database connection for instance.

Parameters:
map - map of entries to store

delete

void delete(Long key)
Deletes the entry with a given key from the store.

Parameters:
key - key to delete from the store.

deleteAll

void deleteAll(Collection<Long> keys)
Deletes multiple entries from the store.

Parameters:
keys - keys of the entries to delete.

load

T load(Long key)
Loads the value of a given key. If distributed map does not contain the value for the given key, then Hazelcast will call the implementation load (key) method to obtain the value. Implementation can use any means of loading the given key; such as an O/R mapping tool, simple SQL, reading a file, etc.

Parameters:
key -
Returns:
value of the key

loadAll

Map<Long,T> loadAll(Collection<Long> keys)
Loads the given keys. This is a batch load operation so that implementation can optimize the multiple loads.

Parameters:
keys - keys of the value entries to load
Returns:
map of loaded key-value pairs.

loadAllKeys

Set<Long> loadAllKeys()
Loads all of the keys from the store.

Returns:
all the keys from the store


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