public class QueueConfig extends Object
IQueue
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_ASYNC_BACKUP_COUNT
Default value of the asynchronous backup count.
|
static int |
DEFAULT_EMPTY_QUEUE_TTL
Default value for the TTL (time to live) for empty Queue.
|
static int |
DEFAULT_MAX_SIZE
Default value for the maximum size of the Queue.
|
static int |
DEFAULT_SYNC_BACKUP_COUNT
Default value for the sychronous backup count.
|
Constructor and Description |
---|
QueueConfig() |
QueueConfig(QueueConfig config) |
QueueConfig(String name) |
Modifier and Type | Method and Description |
---|---|
QueueConfig |
addItemListenerConfig(ItemListenerConfig listenerConfig)
Add an item listener configuration to this queue.
|
QueueConfigReadOnly |
getAsReadOnly()
Deprecated.
this method will be removed in 4.0; it is meant for internal usage only.
|
int |
getAsyncBackupCount()
Get the number of asynchronous backups for this queue.
|
int |
getBackupCount()
Get the number of synchronous backups for this queue.
|
int |
getEmptyQueueTtl()
Returns the TTL (time to live) for emptying the Queue.
|
List<ItemListenerConfig> |
getItemListenerConfigs()
Get the list of item listener configurations for this queue.
|
int |
getMaxSize()
Returns the maximum size of the Queue.
|
String |
getName() |
QueueStoreConfig |
getQueueStoreConfig()
Get the QueueStore (load and store queue items from/to a database) configuration.
|
String |
getQuorumName()
Returns the quorum name for queue operations.
|
int |
getTotalBackupCount()
Get the total number of backups: the backup count plus the asynchronous backup count.
|
boolean |
isStatisticsEnabled()
Check if statistics are enabled for this queue.
|
QueueConfig |
setAsyncBackupCount(int asyncBackupCount)
Sets the number of asynchronous backups.
|
QueueConfig |
setBackupCount(int backupCount)
Sets the number of synchronous backups for this queue.
|
QueueConfig |
setEmptyQueueTtl(int emptyQueueTtl)
Sets the TTL (time to live) for emptying the Queue.
|
QueueConfig |
setItemListenerConfigs(List<ItemListenerConfig> listenerConfigs)
Set the list of item listener configurations for this queue.
|
QueueConfig |
setMaxSize(int maxSize)
Sets the maximum size of the Queue.
|
QueueConfig |
setName(String name)
Set the name for this queue.
|
QueueConfig |
setQueueStoreConfig(QueueStoreConfig queueStoreConfig)
Set the QueueStore (load and store queue items from/to a database) configuration.
|
QueueConfig |
setQuorumName(String quorumName)
Sets the quorum name for queue operations.
|
QueueConfig |
setStatisticsEnabled(boolean statisticsEnabled)
Enables or disables statistics for this queue.
|
String |
toString() |
public static final int DEFAULT_MAX_SIZE
public static final int DEFAULT_SYNC_BACKUP_COUNT
public static final int DEFAULT_ASYNC_BACKUP_COUNT
public static final int DEFAULT_EMPTY_QUEUE_TTL
public QueueConfig()
public QueueConfig(String name)
public QueueConfig(QueueConfig config)
public QueueConfigReadOnly getAsReadOnly()
public int getEmptyQueueTtl()
public QueueConfig setEmptyQueueTtl(int emptyQueueTtl)
emptyQueueTtl
- Set the TTL (time to live) for emptying the Queue to this value.public int getMaxSize()
public QueueConfig setMaxSize(int maxSize)
maxSize
- Set the maximum size of the Queue to this value.public int getTotalBackupCount()
public int getBackupCount()
public QueueConfig setBackupCount(int backupCount)
backupCount
- the number of synchronous backups to setIllegalArgumentException
- if backupCount is smaller than 0,
or larger than the maximum number of backups,
or the sum of the backups and async backups is larger than the maximum number of backupssetAsyncBackupCount(int)
public int getAsyncBackupCount()
public QueueConfig setAsyncBackupCount(int asyncBackupCount)
asyncBackupCount
- the number of asynchronous synchronous backups to setIllegalArgumentException
- if asyncBackupCount smaller than 0,
or larger than the maximum number of backup
or the sum of the backups and async backups is larger than the maximum number of backupssetBackupCount(int)
,
getAsyncBackupCount()
public QueueStoreConfig getQueueStoreConfig()
public QueueConfig setQueueStoreConfig(QueueStoreConfig queueStoreConfig)
queueStoreConfig
- Set the QueueStore configuration to this configuration.public boolean isStatisticsEnabled()
public QueueConfig setStatisticsEnabled(boolean statisticsEnabled)
statisticsEnabled
- True to enable statistics for this queue, false to disable.public String getName()
public QueueConfig setName(String name)
name
- The name to set for this queue.public QueueConfig addItemListenerConfig(ItemListenerConfig listenerConfig)
listenerConfig
- The item listener configuration to add to this queue.public List<ItemListenerConfig> getItemListenerConfigs()
public QueueConfig setItemListenerConfigs(List<ItemListenerConfig> listenerConfigs)
listenerConfigs
- The list of item listener configurations to set for this queue.public String getQuorumName()
public QueueConfig setQuorumName(String quorumName)
quorumName
- the quorum nameCopyright © 2017 Hazelcast, Inc.. All Rights Reserved.