Package com.hazelcast.config
Class QueueStoreConfig
java.lang.Object
com.hazelcast.config.QueueStoreConfig
- All Implemented Interfaces:
- DataSerializable,- IdentifiedDataSerializable
Configuration for the 
QueueStore.- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intThe default size of batches in which the queue will be loaded from the queue store.static final intThe default number of queue item values to keep in memory.static final StringBinary: By default, Hazelcast stores the queue items in serialized form in memory.static final StringBulk Load: When the queue is initialized, items are loaded from QueueStore in bulks.static final StringMemory Limit: This is the number of items after which Hazelcast will store items only to datastore.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanintReturns type identifier for this class.Returns the class name of the queue store implementation to be used when instantiating the queue store.Returns the factory class name which will be used to instantiate the queue store.intReturns DataSerializableFactory factory ID for this class.Returns the queue store factory implementation which will be used to instantiate the queue store.Returns the properties to be used when instantiating the queue store.getProperty(String name) Returns the property with the givennamewhich is used when instantiating and interacting with the queue store.Returns the implementation of the queue store which will be used to store queue items.final inthashCode()booleanReturnstrueif the queue store is enabled,falseotherwise.voidReads fields from the input streamsetClassName(String className) Sets the class name of the queue store implementation to be used when instantiating the queue store.setEnabled(boolean enabled) Enables or disables the queue store.setFactoryClassName(String factoryClassName) Sets the factory class name which will be used to instantiate the queue store.setFactoryImplementation(QueueStoreFactory factoryImplementation) Sets the queue store factory implementation which will be used to instantiate the queue store.setProperties(Properties properties) Sets the properties to be used when instantiating the queue store.setProperty(String name, String value) Sets a property to be used when instantiating the queue store.setStoreImplementation(QueueStore storeImplementation) Sets the implementation of the queue store which will be used to store queue items.toString()voidWrites object fields to output stream
- 
Field Details- 
DEFAULT_MEMORY_LIMITpublic static final int DEFAULT_MEMORY_LIMITThe default number of queue item values to keep in memory. This value is ignored if there is no queue store enabled or if the queue is a priority queue.- See Also:
 
- 
DEFAULT_BULK_LOADpublic static final int DEFAULT_BULK_LOADThe default size of batches in which the queue will be loaded from the queue store. This value is ignored if the queue is a priority queue. In that case, the queue is loaded fully during initialisation.- See Also:
 
- 
STORE_BINARYBinary: By default, Hazelcast stores the queue items in serialized form in memory. Before it inserts the queue items into datastore, it deserializes them. But if you will not reach the queue store from an external application, you might prefer that the items be inserted in binary form. You can get rid of the de-serialization step; this would be a performance optimization. The binary feature is disabled by default.- See Also:
 
- 
STORE_MEMORY_LIMITMemory Limit: This is the number of items after which Hazelcast will store items only to datastore. For example, if the memory limit is 1000, then the 1001st item will be put only to datastore. This feature is useful when you want to avoid out-of-memory conditions. The default number for memory-limit is 1000. If you want to always use memory, you can set it to Integer.MAX_VALUE.- See Also:
 
- 
STORE_BULK_LOADBulk Load: When the queue is initialized, items are loaded from QueueStore in bulks. Bulk load is the size of these bulks. By default, bulk-load is 250.- See Also:
 
 
- 
- 
Constructor Details- 
QueueStoreConfigpublic QueueStoreConfig()
- 
QueueStoreConfig
 
- 
- 
Method Details- 
getStoreImplementationReturns the implementation of the queue store which will be used to store queue items.
- 
setStoreImplementationSets the implementation of the queue store which will be used to store queue items.- Parameters:
- storeImplementation- the implementation to store queue items
- Returns:
- this configuration
- Throws:
- NullPointerException- if the provided implementation is- null
 
- 
isEnabledpublic boolean isEnabled()Returnstrueif the queue store is enabled,falseotherwise.
- 
setEnabledEnables or disables the queue store.- Parameters:
- enabled-- trueto enable the queue store,- falseto disable it
- Returns:
- this configuration
 
- 
getClassNameReturns the class name of the queue store implementation to be used when instantiating the queue store.
- 
setClassNameSets the class name of the queue store implementation to be used when instantiating the queue store. The class should implement theQueueStoreinterface.- Parameters:
- className- the queue store class name
- Returns:
- this configuration
 
- 
getPropertiesReturns the properties to be used when instantiating the queue store. Some properties are used by Hazelcast to determine how to interact with the queue store (seeSTORE_MEMORY_LIMIT,STORE_BINARYandSTORE_BULK_LOAD).
- 
setPropertiesSets the properties to be used when instantiating the queue store. Some properties are used by Hazelcast to determine how to interact with the queue store (seeSTORE_MEMORY_LIMIT,STORE_BINARYandSTORE_BULK_LOAD).- Parameters:
- properties- the properties to be used when instantiating the queue store
- Returns:
- this configuration
 
- 
getPropertyReturns the property with the givennamewhich is used when instantiating and interacting with the queue store.- Parameters:
- name- the property name
- Returns:
- the property value
 
- 
setPropertySets a property to be used when instantiating the queue store. Some properties are used by Hazelcast to determine how to interact with the queue store (seeSTORE_MEMORY_LIMIT,STORE_BINARYandSTORE_BULK_LOAD).- Parameters:
- name- the property name
- value- the property value
- Returns:
- this configuration
 
- 
getFactoryClassNameReturns the factory class name which will be used to instantiate the queue store. The class should implement theQueueStoreFactoryinterface.
- 
setFactoryClassNameSets the factory class name which will be used to instantiate the queue store. The class should implement theQueueStoreFactoryinterface.- Parameters:
- factoryClassName- the queue store factory class name
- Returns:
- this configuration
 
- 
getFactoryImplementationReturns the queue store factory implementation which will be used to instantiate the queue store. The class should implement theQueueStoreFactoryinterface.
- 
setFactoryImplementationSets the queue store factory implementation which will be used to instantiate the queue store. The class should implement theQueueStoreFactoryinterface.- Parameters:
- factoryImplementation- the queue store factory implementation
- Returns:
- this configuration
 
- 
toString
- 
getFactoryIdpublic int getFactoryId()Description copied from interface:IdentifiedDataSerializableReturns DataSerializableFactory factory ID for this class.- Specified by:
- getFactoryIdin interface- IdentifiedDataSerializable
- Returns:
- factory ID
 
- 
getClassIdpublic int getClassId()Description copied from interface:IdentifiedDataSerializableReturns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
- getClassIdin interface- IdentifiedDataSerializable
- Returns:
- type ID
 
- 
writeDataDescription copied from interface:DataSerializableWrites object fields to output stream- Specified by:
- writeDatain interface- DataSerializable
- Parameters:
- out- output
- Throws:
- IOException- if an I/O error occurs. In particular, an- IOExceptionmay be thrown if the output stream has been closed.
 
- 
readDataDescription copied from interface:DataSerializableReads fields from the input stream- Specified by:
- readDatain interface- DataSerializable
- Parameters:
- in- input
- Throws:
- IOException- if an I/O error occurs. In particular, an- IOExceptionmay be thrown if the input stream has been closed.
 
- 
equals
- 
hashCodepublic final int hashCode()
 
-