public class QueueStoreConfig extends Object implements IdentifiedDataSerializable
QueueStore
.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BULK_LOAD
The default size of batches in which the queue will be loaded from the
queue store.
|
static int |
DEFAULT_MEMORY_LIMIT
The default number of queue item values to keep in memory.
|
static String |
STORE_BINARY
Binary: By default, Hazelcast stores the queue items in serialized form in memory.
|
static String |
STORE_BULK_LOAD
Bulk Load: When the queue is initialized, items are loaded from QueueStore in bulks.
|
static String |
STORE_MEMORY_LIMIT
Memory Limit: This is the number of items after which Hazelcast will store items only to
datastore.
|
Constructor and Description |
---|
QueueStoreConfig() |
QueueStoreConfig(QueueStoreConfig config) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getClassId()
Returns type identifier for this class.
|
String |
getClassName()
Returns the class name of the queue store implementation to be used when
instantiating the queue store.
|
String |
getFactoryClassName()
Returns the factory class name which will be used to instantiate the queue
store.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
QueueStoreFactory |
getFactoryImplementation()
Returns the queue store factory implementation which will be used to
instantiate the queue store.
|
Properties |
getProperties()
Returns the properties to be used when instantiating the queue store.
|
String |
getProperty(String name)
Returns the property with the given
name which is used when
instantiating and interacting with the queue store. |
QueueStore |
getStoreImplementation()
Returns the implementation of the queue store which will be used to store
queue items.
|
int |
hashCode() |
boolean |
isEnabled()
Returns
true if the queue store is enabled, false
otherwise. |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
QueueStoreConfig |
setClassName(String className)
Sets the class name of the queue store implementation to be used when
instantiating the queue store.
|
QueueStoreConfig |
setEnabled(boolean enabled)
Enables or disables the queue store.
|
QueueStoreConfig |
setFactoryClassName(String factoryClassName)
Sets the factory class name which will be used to instantiate the queue
store.
|
QueueStoreConfig |
setFactoryImplementation(QueueStoreFactory factoryImplementation)
Sets the queue store factory implementation which will be used to
instantiate the queue store.
|
QueueStoreConfig |
setProperties(Properties properties)
Sets the properties to be used when instantiating the queue store.
|
QueueStoreConfig |
setProperty(String name,
String value)
Sets a property to be used when instantiating the queue store.
|
QueueStoreConfig |
setStoreImplementation(QueueStore storeImplementation)
Sets the implementation of the queue store which will be used to store
queue items.
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public static final int DEFAULT_MEMORY_LIMIT
public static final int DEFAULT_BULK_LOAD
public static final String STORE_BINARY
public static final String STORE_MEMORY_LIMIT
public static final String STORE_BULK_LOAD
public QueueStoreConfig()
public QueueStoreConfig(QueueStoreConfig config)
@Nullable public QueueStore getStoreImplementation()
public QueueStoreConfig setStoreImplementation(@Nonnull QueueStore storeImplementation)
storeImplementation
- the implementation to store queue itemsNullPointerException
- if the provided implementation is null
public boolean isEnabled()
true
if the queue store is enabled, false
otherwise.public QueueStoreConfig setEnabled(boolean enabled)
enabled
- true
to enable the queue store, false
to disable it@Nullable public String getClassName()
public QueueStoreConfig setClassName(@Nonnull String className)
QueueStore
interface.className
- the queue store class namepublic Properties getProperties()
STORE_MEMORY_LIMIT
,
STORE_BINARY
and
STORE_BULK_LOAD
).public QueueStoreConfig setProperties(Properties properties)
STORE_MEMORY_LIMIT
,
STORE_BINARY
and
STORE_BULK_LOAD
).properties
- the properties to be used when instantiating the queue storepublic String getProperty(String name)
name
which is used when
instantiating and interacting with the queue store.name
- the property namepublic QueueStoreConfig setProperty(String name, String value)
STORE_MEMORY_LIMIT
,
STORE_BINARY
and
STORE_BULK_LOAD
).name
- the property namevalue
- the property value@Nullable public String getFactoryClassName()
QueueStoreFactory
interface.public QueueStoreConfig setFactoryClassName(@Nonnull String factoryClassName)
QueueStoreFactory
interface.factoryClassName
- the queue store factory class name@Nullable public QueueStoreFactory getFactoryImplementation()
QueueStoreFactory
interface.public QueueStoreConfig setFactoryImplementation(@Nonnull QueueStoreFactory factoryImplementation)
QueueStoreFactory
interface.factoryImplementation
- the queue store factory implementationpublic int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getClassId()
IdentifiedDataSerializable
getClassId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.Copyright © 2024 Hazelcast, Inc.. All rights reserved.