# Class: CacheConfiguration

## CacheConfiguration()

Class representing Ignite cache configuration on a server.

All configuration settings are optional and have defaults which are defined on a server side.

See Apache Ignite documentation for details of every configuration setting.

## Constructor

#### new CacheConfiguration()

Public constructor.

Source:
  - CacheConfiguration.js, line 947

### Members

#### (static, readonly) CACHE_ATOMICITY_MODE

##### Properties:

Name | Type | Description
--- | --- | ---
`TRANSACTIONAL` |  | 0
`ATOMIC` |  | 1

Source:
  - CacheConfiguration.js, line 863

#### (static, readonly) CACHE_MODE

##### Properties:

Name | Type | Description
--- | --- | ---
`LOCAL` |  | 0
`REPLICATED` |  | 1
`PARTITIONED` |  | 2

Source:
  - CacheConfiguration.js, line 876

#### (static, readonly) PARTITION_LOSS_POLICY

##### Properties:

Name | Type | Description
--- | --- | ---
`READ_ONLY_SAFE` |  | 0
`READ_ONLY_ALL` |  | 1
`READ_WRITE_SAFE` |  | 2
`READ_WRITE_ALL` |  | 3
`IGNORE` |  | 4

Source:
  - CacheConfiguration.js, line 891

#### (static, readonly) REABALANCE_MODE

##### Properties:

Name | Type | Description
--- | --- | ---
`SYNC` |  | 0
`ASYNC` |  | 1
`NONE` |  | 2

Source:
  - CacheConfiguration.js, line 910

#### (static, readonly) WRITE_SYNCHRONIZATION_MODE

##### Properties:

Name | Type | Description
--- | --- | ---
`FULL_SYNC` |  | 0
`FULL_ASYNC` |  | 1
`PRIMARY_SYNC` |  | 2

Source:
  - CacheConfiguration.js, line 925

### Methods

#### getAtomicityMode() → {CacheConfiguration.CACHE_ATOMICITY_MODE}

Source:
  - CacheConfiguration.js, line 998

##### Returns:

Type
  CacheConfiguration.CACHE_ATOMICITY_MODE

#### getBackups() → {number}

Source:
  - CacheConfiguration.js, line 1019

##### Returns:

Type
  number

#### getCacheMode() → {CacheConfiguration.CACHE_MODE}

Source:
  - CacheConfiguration.js, line 1043

##### Returns:

Type
  CacheConfiguration.CACHE_MODE

#### getCopyOnRead() → {boolean}

Source:
  - CacheConfiguration.js, line 1064

##### Returns:

Type
  boolean

#### getDataRegionName() → {string}

Source:
  - CacheConfiguration.js, line 1085

##### Returns:

Type
  string

#### getDefaultLockTimeout() → {number}

Source:
  - CacheConfiguration.js, line 1169

##### Returns:

Type
  number

#### getEagerTtl() → {boolean}

Source:
  - CacheConfiguration.js, line 1106

##### Returns:

Type
  boolean

#### getGroupName() → {string}

Source:
  - CacheConfiguration.js, line 1148

##### Returns:

Type
  string

#### getIsOnheapCacheEnabled() → {boolean}

Source:
  - CacheConfiguration.js, line 1232

##### Returns:

Type
  boolean

#### getKeyConfigurations() → {Array.<CacheKeyConfiguration>}

Source:
  - CacheConfiguration.js, line 1580

##### Returns:

Type
  Array.<CacheKeyConfiguration>

#### getMaxConcurrentAsyncOperations() → {number}

Source:
  - CacheConfiguration.js, line 1190

##### Returns:

Type
  number

#### getMaxQueryIterators() → {number}

Source:
  - CacheConfiguration.js, line 1211

##### Returns:

Type
  number

#### getPartitionLossPolicy() → {CacheConfiguration.PARTITION_LOSS_POLICY}

Source:
  - CacheConfiguration.js, line 1256

##### Returns:

Type
  CacheConfiguration.PARTITION_LOSS_POLICY

#### getQueryDetailMetricsSize() → {number}

Source:
  - CacheConfiguration.js, line 1277

##### Returns:

Type
  number

#### getQueryEntities() → {Array.<QueryEntity>}

Source:
  - CacheConfiguration.js, line 1604

##### Returns:

Type
  Array.<QueryEntity>

#### getQueryParallelism() → {number}

Source:
  - CacheConfiguration.js, line 1298

##### Returns:

Type
  number

#### getReadFromBackup() → {boolean}

Source:
  - CacheConfiguration.js, line 1319

##### Returns:

Type
  boolean

#### getRebalanceBatchesPrefetchCount() → {number}

Source:
  - CacheConfiguration.js, line 1361

##### Returns:

Type
  number

#### getRebalanceBatchSize() → {number}

Source:
  - CacheConfiguration.js, line 1340

##### Returns:

Type
  number

#### getRebalanceDelay() → {number}

Source:
  - CacheConfiguration.js, line 1382

##### Returns:

Type
  number

#### getRebalanceMode() → {CacheConfiguration.REABALANCE_MODE}

Source:
  - CacheConfiguration.js, line 1406

##### Returns:

Type
  CacheConfiguration.REABALANCE_MODE

#### getRebalanceOrder() → {number}

Source:
  - CacheConfiguration.js, line 1427

##### Returns:

Type
  number

#### getRebalanceThrottle() → {number}

Source:
  - CacheConfiguration.js, line 1448

##### Returns:

Type
  number

#### getRebalanceTimeout() → {number}

Source:
  - CacheConfiguration.js, line 1469

##### Returns:

Type
  number

#### getSqlEscapeAll() → {boolean}

Source:
  - CacheConfiguration.js, line 1490

##### Returns:

Type
  boolean

#### getSqlIndexInlineMaxSize() → {number}

Source:
  - CacheConfiguration.js, line 1511

##### Returns:

Type
  number

#### getSqlSchema() → {string}

Source:
  - CacheConfiguration.js, line 1532

##### Returns:

Type
  string

#### getStatisticsEnabled() → {boolean}

Source:
  - CacheConfiguration.js, line 1127

##### Returns:

Type
  boolean

#### getWriteSynchronizationMode() → {CacheConfiguration.WRITE_SYNCHRONIZATION_MODE}

Source:
  - CacheConfiguration.js, line 1556

##### Returns:

Type
  CacheConfiguration.WRITE_SYNCHRONIZATION_MODE

#### setAtomicityMode(atomicityMode) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`atomicityMode` | CacheConfiguration.CACHE_ATOMICITY_MODE |

Source:
  - CacheConfiguration.js, line 987

##### Throws:

if error.

Type
  IgniteClientError

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setBackups(backups) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`backups` | number |

Source:
  - CacheConfiguration.js, line 1009

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setCacheMode(cacheMode) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`cacheMode` | CacheConfiguration.CACHE_MODE |

Source:
  - CacheConfiguration.js, line 1032

##### Throws:

if error.

Type
  IgniteClientError

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setCopyOnRead(copyOnRead) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`copyOnRead` | boolean |

Source:
  - CacheConfiguration.js, line 1054

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setDataRegionName(dataRegionName) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`dataRegionName` | string |

Source:
  - CacheConfiguration.js, line 1075

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setDefaultLockTimeout(lockTimeout) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`lockTimeout` | number |

Source:
  - CacheConfiguration.js, line 1159

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setEagerTtl(eagerTtl) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`eagerTtl` | boolean |

Source:
  - CacheConfiguration.js, line 1096

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setGroupName(groupName) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`groupName` | string |

Source:
  - CacheConfiguration.js, line 1138

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setIsOnheapCacheEnabled(isOnheapCacheEnabled) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`isOnheapCacheEnabled` | boolean |

Source:
  - CacheConfiguration.js, line 1222

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setKeyConfigurations(…keyConfigurations) → {CacheConfiguration}

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`keyConfigurations` | CacheKeyConfiguration | <repeatable> |

Source:
  - CacheConfiguration.js, line 1569

##### Throws:

if error.

Type
  IgniteClientError

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setMaxConcurrentAsyncOperations(maxConcurrentAsyncOperations) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`maxConcurrentAsyncOperations` | number |

Source:
  - CacheConfiguration.js, line 1180

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setMaxQueryIterators(maxQueryIterators) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`maxQueryIterators` | number |

Source:
  - CacheConfiguration.js, line 1201

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setPartitionLossPolicy(partitionLossPolicy) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`partitionLossPolicy` | CacheConfiguration.PARTITION_LOSS_POLICY |

Source:
  - CacheConfiguration.js, line 1245

##### Throws:

if error.

Type
  IgniteClientError

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setQueryDetailMetricsSize(queryDetailMetricsSize) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`queryDetailMetricsSize` | number |

Source:
  - CacheConfiguration.js, line 1267

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setQueryEntities(…queryEntities) → {CacheConfiguration}

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`queryEntities` | QueryEntity | <repeatable> |

Source:
  - CacheConfiguration.js, line 1593

##### Throws:

if error.

Type
  IgniteClientError

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setQueryParallelism(queryParallelism) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`queryParallelism` | number |

Source:
  - CacheConfiguration.js, line 1288

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setReadFromBackup(readFromBackup) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`readFromBackup` | boolean |

Source:
  - CacheConfiguration.js, line 1309

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setRebalanceBatchesPrefetchCount(rebalanceBatchesPrefetchCount) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`rebalanceBatchesPrefetchCount` | number |

Source:
  - CacheConfiguration.js, line 1351

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setRebalanceBatchSize(rebalanceBatchSize) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`rebalanceBatchSize` | number |

Source:
  - CacheConfiguration.js, line 1330

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setRebalanceDelay(rebalanceDelay) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`rebalanceDelay` | number |

Source:
  - CacheConfiguration.js, line 1372

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setRebalanceMode(rebalanceMode) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`rebalanceMode` | CacheConfiguration.REABALANCE_MODE |

Source:
  - CacheConfiguration.js, line 1395

##### Throws:

if error.

Type
  IgniteClientError

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setRebalanceOrder(rebalanceOrder) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`rebalanceOrder` | number |

Source:
  - CacheConfiguration.js, line 1417

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setRebalanceThrottle(rebalanceThrottle) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`rebalanceThrottle` | number |

Source:
  - CacheConfiguration.js, line 1438

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setRebalanceTimeout(rebalanceTimeout) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`rebalanceTimeout` | number |

Source:
  - CacheConfiguration.js, line 1459

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setSqlEscapeAll(sqlEscapeAll) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`sqlEscapeAll` | boolean |

Source:
  - CacheConfiguration.js, line 1480

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setSqlIndexInlineMaxSize(sqlIndexInlineMaxSize) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`sqlIndexInlineMaxSize` | number |

Source:
  - CacheConfiguration.js, line 1501

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setSqlSchema(sqlSchema) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`sqlSchema` | string |

Source:
  - CacheConfiguration.js, line 1522

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setStatisticsEnabled(statisticsEnabled) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`statisticsEnabled` | boolean |

Source:
  - CacheConfiguration.js, line 1117

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration

#### setWriteSynchronizationMode(writeSynchronizationMode) → {CacheConfiguration}

##### Parameters:

Name | Type | Description
--- | --- | ---
`writeSynchronizationMode` | CacheConfiguration.WRITE_SYNCHRONIZATION_MODE |

Source:
  - CacheConfiguration.js, line 1545

##### Throws:

if error.

Type
  IgniteClientError

##### Returns:

- the same instance of the CacheConfiguration.

Type
  CacheConfiguration