Set Configuration

The following are the example configurations.


<set name="default">


Config config = new Config();
CollectionConfig collectionSet = config.getCollectionConfig();
collectionSet.setName( "MySet" ).setBackupCount( "1" )
        .setMaxSize( "10" ).setStatisticsEnabled( "true" );

It has below elements.

  • backup-count: Count of synchronous backups. Remember that, Set is a non-partitioned data structure, i.e. all entries of a Set resides in one partition. When this parameter is '1', it means there will be a backup of that Set in another node in the cluster. When it is '2', 2 nodes will have the backup.
  • async-backup-count: Count of asynchronous backups.
  • statistics-enabled: If set as true, you can retrieve statistics for this Set.
  • max-size: It is the maximum entry size for this Set.
  • item-listeners: This element lets you add listeners (listener classes) for the list items. You can also set the attributes include-value to true if you want the item event to contain the item values and local to true if you want to listen the items on the local node.