Package 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 Description CollectionConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CacheAtomicityModegetAtomicityMode()intgetBackups()CacheModegetCacheMode()StringgetGroupName()IgnitePredicate<ClusterNode>getNodeFilter()longgetOffHeapMaxMemory()Deprecated.No longer used.booleanisCollocated()CollectionConfigurationsetAtomicityMode(CacheAtomicityMode atomicityMode)CollectionConfigurationsetBackups(int backups)CollectionConfigurationsetCacheMode(CacheMode cacheMode)CollectionConfigurationsetCollocated(boolean collocated)CollectionConfigurationsetGroupName(String grpName)CollectionConfigurationsetNodeFilter(IgnitePredicate<ClusterNode> nodeFilter)CollectionConfigurationsetOffHeapMaxMemory(long offHeapMaxMemory)Deprecated.No longer used.StringtoString()
-
-
-
Method Detail
-
isCollocated
public boolean isCollocated()
- Returns:
Trueif all items within the same collection will be collocated on the same node.
-
setCollocated
public CollectionConfiguration setCollocated(boolean collocated)
- Parameters:
collocated- Iftruethen 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 inCacheMode.PARTITIONEDcache.- Returns:
thisfor chaining.
-
getAtomicityMode
public CacheAtomicityMode getAtomicityMode()
- Returns:
- Cache atomicity mode.
-
setAtomicityMode
public CollectionConfiguration setAtomicityMode(CacheAtomicityMode atomicityMode)
- Parameters:
atomicityMode- Cache atomicity mode.- Returns:
thisfor chaining.
-
getCacheMode
public CacheMode getCacheMode()
- Returns:
- Cache mode.
-
setCacheMode
public CollectionConfiguration setCacheMode(CacheMode cacheMode)
- Parameters:
cacheMode- Cache mode.- Returns:
thisfor chaining.
-
getNodeFilter
public IgnitePredicate<ClusterNode> getNodeFilter()
- Returns:
- Predicate specifying on which nodes the cache should be started.
-
setNodeFilter
public CollectionConfiguration setNodeFilter(IgnitePredicate<ClusterNode> nodeFilter)
- Parameters:
nodeFilter- Predicate specifying on which nodes the cache should be started.- Returns:
thisfor chaining.
-
getBackups
public int getBackups()
- Returns:
- Number of backups.
-
setBackups
public CollectionConfiguration setBackups(int backups)
- Parameters:
backups- Cache number of backups.- Returns:
thisfor chaining.
-
getOffHeapMaxMemory
@Deprecated public long getOffHeapMaxMemory()
Deprecated.No longer used.- Returns:
- Off-heap memory size.
-
setOffHeapMaxMemory
@Deprecated public CollectionConfiguration setOffHeapMaxMemory(long offHeapMaxMemory)
Deprecated.No longer used.- Parameters:
offHeapMaxMemory- Off-heap memory size.- Returns:
thisfor chaining.
-
getGroupName
public String getGroupName()
- Returns:
- Group name.
-
setGroupName
public CollectionConfiguration setGroupName(String grpName)
- Parameters:
grpName- Group name.- Returns:
thisfor chaining.
-
-