org.apache.ignite.configuration

## Class CollectionConfiguration

- java.lang.Object
- - org.apache.ignite.configuration.CollectionConfiguration

All Implemented Interfaces:
  Serializable

    public class CollectionConfiguration
    extends Object
    implements Serializable

Configuration for Ignite collections.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`CollectionConfiguration()`

### Method Summary

Methods
`CacheAtomicityMode` `getAtomicityMode()`
`int` `getBackups()`
`CacheMode` `getCacheMode()`
`CacheMemoryMode` `getMemoryMode()`
`IgnitePredicate<ClusterNode>` `getNodeFilter()`
`long` `getOffHeapMaxMemory()`
`boolean` `isCollocated()`
`void` `setAtomicityMode(CacheAtomicityMode atomicityMode)`
`void` `setBackups(int backups)`
`void` `setCacheMode(CacheMode cacheMode)`
`void` `setCollocated(boolean collocated)`
`void` `setMemoryMode(CacheMemoryMode memoryMode)`
`void` `setNodeFilter(IgnitePredicate<ClusterNode> nodeFilter)`
`void` `setOffHeapMaxMemory(long offHeapMaxMemory)`
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### CollectionConfiguration

    public CollectionConfiguration()

### Method Detail

#### isCollocated

    public boolean isCollocated()

Returns:
  `True` if all items within the same collection will be collocated on the same node.

#### setCollocated

    public void setCollocated(boolean collocated)

Parameters:
  `collocated` - If `true` then all items within the same collection will be collocated on the same node. Otherwise elements of the same set maybe be cached on different nodes. This parameter works only collections stored in `CacheMode.PARTITIONED` cache.

#### getAtomicityMode

    public CacheAtomicityMode getAtomicityMode()

Returns:
  Cache atomicity mode.

#### setAtomicityMode

    public void setAtomicityMode(CacheAtomicityMode atomicityMode)

Parameters:
  `atomicityMode` - Cache atomicity mode.

#### getCacheMode

    public CacheMode getCacheMode()

Returns:
  Cache mode.

#### setCacheMode

    public void setCacheMode(CacheMode cacheMode)

Parameters:
  `cacheMode` - Cache mode.

#### getMemoryMode

    public CacheMemoryMode getMemoryMode()

Returns:
  Cache memory mode.

#### setMemoryMode

    public void setMemoryMode(CacheMemoryMode memoryMode)

Parameters:
  `memoryMode` - Memory mode.

#### getNodeFilter

    public IgnitePredicate<ClusterNode> getNodeFilter()

Returns:
  Predicate specifying on which nodes the cache should be started.

#### setNodeFilter

    public void setNodeFilter(IgnitePredicate<ClusterNode> nodeFilter)

Parameters:
  `nodeFilter` - Predicate specifying on which nodes the cache should be started.

#### getBackups

    public int getBackups()

Returns:
  Number of backups.

#### setBackups

    public void setBackups(int backups)

Parameters:
  `backups` - Cache number of backups.

#### getOffHeapMaxMemory

    public long getOffHeapMaxMemory()

Returns:
  Off-heap memory size.

#### setOffHeapMaxMemory

    public void setOffHeapMaxMemory(long offHeapMaxMemory)

Parameters:
  `offHeapMaxMemory` - Off-heap memory size.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.9.0
Release Date | : March 2 2017