|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hazelcast.config.QueueConfig
public class QueueConfig
Contains the configuration for an IQueue
Field Summary | |
---|---|
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 Summary | |
---|---|
QueueConfig()
|
|
QueueConfig(QueueConfig config)
|
|
QueueConfig(String name)
|
Method Summary | |
---|---|
QueueConfig |
addItemListenerConfig(ItemListenerConfig listenerConfig)
Add an item listener configuration to this queue configuration. |
QueueConfigReadOnly |
getAsReadOnly()
Returns a read only copy of the queue configuration. |
int |
getAsyncBackupCount()
Get the asynchronous backup count. |
int |
getBackupCount()
Get the number of synchronous backups. |
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 configuration. |
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. |
int |
getTotalBackupCount()
Get the total number of backups: the backup count and the asynchronous backup count. |
boolean |
isStatisticsEnabled()
Check if statistics are enabled. |
QueueConfig |
setAsyncBackupCount(int asyncBackupCount)
Sets the number of asynchronous backups. |
QueueConfig |
setBackupCount(int backupCount)
Sets the number of synchronous backups. |
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 configuration to this list. |
QueueConfig |
setMaxSize(int maxSize)
Sets the maximum size of the Queue. |
QueueConfig |
setName(String name)
Set the name for this queue configuration. |
QueueConfig |
setQueueStoreConfig(QueueStoreConfig queueStoreConfig)
Set the QueueStore (load and store queue items from/to a database) configuration. |
QueueConfig |
setStatisticsEnabled(boolean statisticsEnabled)
Set the statistics enabled value for this queue configuration. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public QueueConfig()
public QueueConfig(String name)
public QueueConfig(QueueConfig config)
Method Detail |
---|
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 set
IllegalArgumentException
- 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 set
IllegalArgumentException
- 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
- Set to true or false to enable or disable statistics.
public String getName()
public QueueConfig setName(String name)
name
- The name to set for this queue configuration.
public QueueConfig addItemListenerConfig(ItemListenerConfig listenerConfig)
listenerConfig
- The item listener configuration to add to this queue configuration.
public List<ItemListenerConfig> getItemListenerConfigs()
public QueueConfig setItemListenerConfigs(List<ItemListenerConfig> listenerConfigs)
listenerConfigs
- The list of item listener configurations to set for this queue configuration.
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |