Package com.hazelcast.collection
Interface QueueStore<T>
- Type Parameters:
T
- queue item type
public interface QueueStore<T>
QueueStore makes a queue backed by a central data store; such as database, disk, etc.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deletes the entry with a given key from the store.void
deleteAll
(Collection<Long> keys) Deletes multiple entries from the store.Loads the value of a given key.loadAll
(Collection<Long> keys) Loads the given keys.Loads all of the keys from the store.void
Stores the key-value pair.void
Stores multiple entries.
-
Method Details
-
store
Stores the key-value pair.- Parameters:
key
- key of the entry to storevalue
- value of the entry to store
-
storeAll
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
Deletes the entry with a given key from the store.- Parameters:
key
- key to delete from the store.
-
deleteAll
Deletes multiple entries from the store.- Parameters:
keys
- keys of the entries to delete.
-
load
Loads the value of a given key.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
- the key of the requested value- Returns:
- value of the key
-
loadAll
Loads the given keys. This is a batch load operation so that implementation can optimize the multiple loads.Set the bulk-load property to configure batch loading. When the queue is initialized, items are loaded from QueueStore in bulks. Bulk load is the size of these bulks. The default value of bulk-load is 250.
- Parameters:
keys
- keys of the value entries to load- Returns:
- map of loaded key-value pairs. May return null if no values loaded.
-
loadAllKeys
Loads all of the keys from the store.The items identified by the keys will be loaded in the iteration order of the returned Set
- Returns:
- all the keys from the store. May return null if no keys loaded.
-