com.hazelcast.config
Class CollectionConfig<T extends CollectionConfig>

java.lang.Object
  extended by com.hazelcast.config.CollectionConfig<T>
Type Parameters:
T - Type of Collection such as List, Set
Direct Known Subclasses:
ListConfig, SetConfig

public abstract class CollectionConfig<T extends CollectionConfig>
extends Object

Provides configuration service for Collection.


Field Summary
static int DEFAULT_ASYNC_BACKUP_COUNT
          Asynchronous Backup Counter
static int DEFAULT_MAX_SIZE
          Maximum size Configuration
static int DEFAULT_SYNC_BACKUP_COUNT
          Synchronous Backup Counter
 
Constructor Summary
protected CollectionConfig()
           
protected CollectionConfig(CollectionConfig config)
           
 
Method Summary
 void addItemListenerConfig(ItemListenerConfig itemListenerConfig)
           
abstract  T getAsReadOnly()
           
 int getAsyncBackupCount()
           
 int getBackupCount()
           
 List<ItemListenerConfig> getItemListenerConfigs()
           
 int getMaxSize()
           
 String getName()
           
 int getTotalBackupCount()
           
 boolean isStatisticsEnabled()
           
 T setAsyncBackupCount(int asyncBackupCount)
          Sets the number of asynchronous backups.
 T setBackupCount(int backupCount)
          Sets the number of synchronous backups.
 T setItemListenerConfigs(List<ItemListenerConfig> listenerConfigs)
           
 T setMaxSize(int maxSize)
           
 T setName(String name)
           
 T setStatisticsEnabled(boolean statisticsEnabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX_SIZE

public static final int DEFAULT_MAX_SIZE
Maximum size Configuration

See Also:
Constant Field Values

DEFAULT_SYNC_BACKUP_COUNT

public static final int DEFAULT_SYNC_BACKUP_COUNT
Synchronous Backup Counter

See Also:
Constant Field Values

DEFAULT_ASYNC_BACKUP_COUNT

public static final int DEFAULT_ASYNC_BACKUP_COUNT
Asynchronous Backup Counter

See Also:
Constant Field Values
Constructor Detail

CollectionConfig

protected CollectionConfig()

CollectionConfig

protected CollectionConfig(CollectionConfig config)
Method Detail

getAsReadOnly

public abstract T getAsReadOnly()

getName

public String getName()

setName

public T setName(String name)

getItemListenerConfigs

public List<ItemListenerConfig> getItemListenerConfigs()

setItemListenerConfigs

public T setItemListenerConfigs(List<ItemListenerConfig> listenerConfigs)

getTotalBackupCount

public int getTotalBackupCount()

getBackupCount

public int getBackupCount()

setBackupCount

public T setBackupCount(int backupCount)
Sets the number of synchronous backups.

Parameters:
backupCount - the number of synchronous backups to set
Returns:
the current CollectionConfig
Throws:
IllegalArgumentException - if backupCount 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 backups
See Also:
setAsyncBackupCount(int)

getAsyncBackupCount

public int getAsyncBackupCount()

setAsyncBackupCount

public T setAsyncBackupCount(int asyncBackupCount)
Sets the number of asynchronous backups.

Parameters:
asyncBackupCount - the number of asynchronous synchronous backups to set
Returns:
the updated CollectionConfig
Throws:
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 backups
See Also:
setBackupCount(int), getAsyncBackupCount()

getMaxSize

public int getMaxSize()

setMaxSize

public T setMaxSize(int maxSize)

isStatisticsEnabled

public boolean isStatisticsEnabled()

setStatisticsEnabled

public T setStatisticsEnabled(boolean statisticsEnabled)

addItemListenerConfig

public void addItemListenerConfig(ItemListenerConfig itemListenerConfig)


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