public class LatencyTrackingQueueStore<T> extends Object implements QueueStore<T>
Constructor and Description |
---|
LatencyTrackingQueueStore(QueueStore<T> delegate,
StoreLatencyPlugin plugin,
String queueName) |
Modifier and Type | Method and Description |
---|---|
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.
|
public LatencyTrackingQueueStore(QueueStore<T> delegate, StoreLatencyPlugin plugin, String queueName)
public void store(Long key, T value)
QueueStore
store
in interface QueueStore<T>
key
- key of the entry to storevalue
- value of the entry to storepublic void storeAll(Map<Long,T> map)
QueueStore
storeAll
in interface QueueStore<T>
map
- map of entries to storepublic void delete(Long key)
QueueStore
delete
in interface QueueStore<T>
key
- key to delete from the store.public void deleteAll(Collection<Long> keys)
QueueStore
deleteAll
in interface QueueStore<T>
keys
- keys of the entries to delete.public T load(Long key)
QueueStore
Implementation can use any means of loading the given key; such as an O/R mapping tool, simple SQL, reading a file, etc.
load
in interface QueueStore<T>
key
- the key of the requested valuepublic Map<Long,T> loadAll(Collection<Long> keys)
QueueStore
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.
loadAll
in interface QueueStore<T>
keys
- keys of the value entries to loadpublic Set<Long> loadAllKeys()
QueueStore
The items identified by the keys will be loaded in the iteration order of the returned Set
loadAllKeys
in interface QueueStore<T>
Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.