com.hazelcast.core

## 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

    All Methods Instance Methods Abstract Methods
    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.

- - ### 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.

      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

          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.

      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

          Set<Long> 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.

Copyright © 2020. All rights reserved.