com.hazelcast.queue.impl
Class QueueStoreWrapper

java.lang.Object
  extended by com.hazelcast.queue.impl.QueueStoreWrapper
All Implemented Interfaces:
QueueStore<Data>

public final class QueueStoreWrapper
extends Object
implements QueueStore<Data>

Wrapper for the Queue Store.


Method Summary
static QueueStoreWrapper create(String name, QueueStoreConfig storeConfig, SerializationService serializationService)
          Factory method that creates a QueueStoreWrapper
 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.
 int getBulkLoad()
           
 int getMemoryLimit()
           
 boolean isBinary()
           
 boolean isEnabled()
           
 Data load(Long key)
          Loads the value of a given key.
 Map<Long,Data> loadAll(Collection<Long> keys)
          Loads the given keys.
 Set<Long> loadAllKeys()
          Loads all of the keys from the store.
 void store(Long key, Data value)
          Stores the key-value pair.
 void storeAll(Map<Long,Data> map)
          Stores multiple entries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static QueueStoreWrapper create(String name,
                                       QueueStoreConfig storeConfig,
                                       SerializationService serializationService)
Factory method that creates a QueueStoreWrapper

Parameters:
name - queue name
storeConfig - store config of queue
serializationService - serialization service.
Returns:
returns a new instance of QueueStoreWrapper

store

public void store(Long key,
                  Data value)
Description copied from interface: QueueStore
Stores the key-value pair.

Specified by:
store in interface QueueStore<Data>
Parameters:
key - key of the entry to store
value - value of the entry to store

storeAll

public void storeAll(Map<Long,Data> map)
Description copied from interface: QueueStore
Stores multiple entries. Implementation of this method can optimize the store operation by storing all entries in one database connection for instance.

Specified by:
storeAll in interface QueueStore<Data>
Parameters:
map - map of entries to store

delete

public void delete(Long key)
Description copied from interface: QueueStore
Deletes the entry with a given key from the store.

Specified by:
delete in interface QueueStore<Data>
Parameters:
key - key to delete from the store.

deleteAll

public void deleteAll(Collection<Long> keys)
Description copied from interface: QueueStore
Deletes multiple entries from the store.

Specified by:
deleteAll in interface QueueStore<Data>
Parameters:
keys - keys of the entries to delete.

load

public Data load(Long key)
Description copied from interface: QueueStore
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.

Specified by:
load in interface QueueStore<Data>
Returns:
value of the key

loadAll

public Map<Long,Data> loadAll(Collection<Long> keys)
Description copied from interface: QueueStore
Loads the given keys. This is a batch load operation so that implementation can optimize the multiple loads.

Specified by:
loadAll in interface QueueStore<Data>
Parameters:
keys - keys of the value entries to load
Returns:
map of loaded key-value pairs.

loadAllKeys

public Set<Long> loadAllKeys()
Description copied from interface: QueueStore
Loads all of the keys from the store.

Specified by:
loadAllKeys in interface QueueStore<Data>
Returns:
all the keys from the store

isEnabled

public boolean isEnabled()

isBinary

public boolean isBinary()

getMemoryLimit

public int getMemoryLimit()

getBulkLoad

public int getBulkLoad()


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