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 CacheAtomicityMode
getAtomicityMode()
int
getBackups()
CacheMode
getCacheMode()
String
getGroupName()
IgnitePredicate<ClusterNode>
getNodeFilter()
long
getOffHeapMaxMemory()
Deprecated.No longer used.boolean
isCollocated()
CollectionConfiguration
setAtomicityMode(CacheAtomicityMode atomicityMode)
CollectionConfiguration
setBackups(int backups)
CollectionConfiguration
setCacheMode(CacheMode cacheMode)
CollectionConfiguration
setCollocated(boolean collocated)
CollectionConfiguration
setGroupName(String grpName)
CollectionConfiguration
setNodeFilter(IgnitePredicate<ClusterNode> nodeFilter)
CollectionConfiguration
setOffHeapMaxMemory(long offHeapMaxMemory)
Deprecated.No longer used.String
toString()
-
-
-
Method Detail
-
isCollocated
public boolean isCollocated()
- Returns:
True
if all items within the same collection will be collocated on the same node.
-
setCollocated
public CollectionConfiguration setCollocated(boolean collocated)
- Parameters:
collocated
- Iftrue
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 inCacheMode.PARTITIONED
cache.- Returns:
this
for chaining.
-
getAtomicityMode
public CacheAtomicityMode getAtomicityMode()
- Returns:
- Cache atomicity mode.
-
setAtomicityMode
public CollectionConfiguration setAtomicityMode(CacheAtomicityMode atomicityMode)
- Parameters:
atomicityMode
- Cache atomicity mode.- Returns:
this
for chaining.
-
getCacheMode
public CacheMode getCacheMode()
- Returns:
- Cache mode.
-
setCacheMode
public CollectionConfiguration setCacheMode(CacheMode cacheMode)
- Parameters:
cacheMode
- Cache mode.- Returns:
this
for 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:
this
for chaining.
-
getBackups
public int getBackups()
- Returns:
- Number of backups.
-
setBackups
public CollectionConfiguration setBackups(int backups)
- Parameters:
backups
- Cache number of backups.- Returns:
this
for 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:
this
for chaining.
-
getGroupName
public String getGroupName()
- Returns:
- Group name.
-
setGroupName
public CollectionConfiguration setGroupName(String grpName)
- Parameters:
grpName
- Group name.- Returns:
this
for chaining.
-
-