org.apache.ignite.client

## Class ClientCacheConfiguration

- java.lang.Object
- - org.apache.ignite.client.ClientCacheConfiguration

- All Implemented Interfaces:
    Serializable

      public final class ClientCacheConfiguration
      extends Object
      implements Serializable

  Cache configuration.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientCacheConfiguration()` Default constructor.
    `ClientCacheConfiguration(ClientCacheConfiguration ccfg)` Creates client cache configuration by coping all configuration properties from the given one.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CacheAtomicityMode` | `getAtomicityMode()`
    `int` | `getBackups()`
    `CacheMode` | `getCacheMode()`
    `String` | `getDataRegionName()`
    `long` | `getDefaultLockTimeout()` Gets default lock acquisition timeout.
    `javax.cache.expiry.ExpiryPolicy` | `getExpiryPolicy()`
    `String` | `getGroupName()` Gets the cache group name.
    `CacheKeyConfiguration[]` | `getKeyConfiguration()`
    `int` | `getMaxConcurrentAsyncOperations()`
    `int` | `getMaxQueryIteratorsCount()`
    `String` | `getName()`
    `PartitionLossPolicy` | `getPartitionLossPolicy()` Gets partition loss policy.
    `int` | `getQueryDetailMetricsSize()`
    `QueryEntity[]` | `getQueryEntities()`
    `int` | `getQueryParallelism()`
    `long` | `getRebalanceBatchesPrefetchCount()` To gain better rebalancing performance supplier node can provide more than one batch at rebalancing start and provide one new to each next demand request.
    `int` | `getRebalanceBatchSize()` Gets size (in number bytes) to be loaded within a single rebalance message.
    `long` | `getRebalanceDelay()` Gets delay in milliseconds upon a node joining or leaving topology (or crash) after which rebalancing should be started automatically.
    `CacheRebalanceMode` | `getRebalanceMode()` Gets rebalance mode.
    `int` | `getRebalanceOrder()` Gets cache rebalance order.
    `long` | `getRebalanceThrottle()` Time in milliseconds to wait between rebalance messages to avoid overloading of CPU or network.
    `long` | `getRebalanceTimeout()` Gets rebalance timeout (ms).
    `int` | `getSqlIndexMaxInlineSize()`
    `String` | `getSqlSchema()`
    `CacheWriteSynchronizationMode` | `getWriteSynchronizationMode()` Gets write synchronization mode.
    `boolean` | `isCopyOnRead()`
    `boolean` | `isEagerTtl()` Gets flag indicating whether expired cache entries will be eagerly removed from cache.
    `boolean` | `isOnheapCacheEnabled()`
    `boolean` | `isReadFromBackup()` Gets flag indicating whether data can be read from backup.
    `boolean` | `isSqlEscapeAll()`
    `boolean` | `isStatisticsEnabled()`
    `ClientCacheConfiguration` | `setAtomicityMode(CacheAtomicityMode atomicityMode)`
    `ClientCacheConfiguration` | `setBackups(int backups)`
    `ClientCacheConfiguration` | `setCacheMode(CacheMode cacheMode)`
    `ClientCacheConfiguration` | `setCopyOnRead(boolean newVal)`
    `ClientCacheConfiguration` | `setDataRegionName(String newVal)`
    `ClientCacheConfiguration` | `setDefaultLockTimeout(long dfltLockTimeout)`
    `ClientCacheConfiguration` | `setEagerTtl(boolean eagerTtl)`
    `ClientCacheConfiguration` | `setExpiryPolicy(javax.cache.expiry.ExpiryPolicy expiryPlc)`
    `ClientCacheConfiguration` | `setGroupName(String newVal)`
    `ClientCacheConfiguration` | `setKeyConfiguration(CacheKeyConfiguration... newVal)`
    `ClientCacheConfiguration` | `setMaxConcurrentAsyncOperations(int newVal)`
    `ClientCacheConfiguration` | `setMaxQueryIteratorsCount(int newVal)`
    `ClientCacheConfiguration` | `setName(String name)`
    `ClientCacheConfiguration` | `setOnheapCacheEnabled(boolean newVal)`
    `ClientCacheConfiguration` | `setPartitionLossPolicy(PartitionLossPolicy newVal)`
    `ClientCacheConfiguration` | `setQueryDetailMetricsSize(int newVal)`
    `ClientCacheConfiguration` | `setQueryEntities(QueryEntity... newVal)`
    `ClientCacheConfiguration` | `setQueryParallelism(int newVal)`
    `ClientCacheConfiguration` | `setReadFromBackup(boolean readFromBackup)`
    `ClientCacheConfiguration` | `setRebalanceBatchesPrefetchCount(long rebalanceBatchesPrefetchCnt)`
    `ClientCacheConfiguration` | `setRebalanceBatchSize(int rebalanceBatchSize)`
    `ClientCacheConfiguration` | `setRebalanceDelay(long rebalanceDelay)`
    `ClientCacheConfiguration` | `setRebalanceMode(CacheRebalanceMode rebalanceMode)`
    `ClientCacheConfiguration` | `setRebalanceOrder(int rebalanceOrder)`
    `ClientCacheConfiguration` | `setRebalanceThrottle(long newVal)`
    `ClientCacheConfiguration` | `setRebalanceTimeout(long newVal)`
    `ClientCacheConfiguration` | `setSqlEscapeAll(boolean newVal)`
    `ClientCacheConfiguration` | `setSqlIndexMaxInlineSize(int newVal)`
    `ClientCacheConfiguration` | `setSqlSchema(String newVal)`
    `ClientCacheConfiguration` | `setStatisticsEnabled(boolean newVal)`
    `ClientCacheConfiguration` | `setWriteSynchronizationMode(CacheWriteSynchronizationMode newVal)`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### ClientCacheConfiguration

          public ClientCacheConfiguration()

      Default constructor.

    - #### ClientCacheConfiguration

          public ClientCacheConfiguration(ClientCacheConfiguration ccfg)

      Creates client cache configuration by coping all configuration properties from the given one.
      Parameters:
        `ccfg` - Client cache configuration to copy from.

  - ### Method Detail

    - #### getName

          public String getName()

      Returns:
        Cache name.

    - #### setName

          public ClientCacheConfiguration setName(String name)

      Parameters:
        `name` - New cache name.

    - #### getAtomicityMode

          public CacheAtomicityMode getAtomicityMode()

      Returns:
        Cache atomicity mode.

    - #### setAtomicityMode

          public ClientCacheConfiguration setAtomicityMode(CacheAtomicityMode atomicityMode)

      Parameters:
        `atomicityMode` - New Atomicity mode.

    - #### getBackups

          public int getBackups()

      Returns:
        Number of backups.

    - #### setBackups

          public ClientCacheConfiguration setBackups(int backups)

      Parameters:
        `backups` - New number of backups.

    - #### getCacheMode

          public CacheMode getCacheMode()

      Returns:
        Cache mode.

    - #### setCacheMode

          public ClientCacheConfiguration setCacheMode(CacheMode cacheMode)

      Parameters:
        `cacheMode` - New cache mode.

    - #### isEagerTtl

          public boolean isEagerTtl()

      Gets flag indicating whether expired cache entries will be eagerly removed from cache. If there is at least one cache configured with this flag set to `true`, Ignite will create a single thread to clean up expired entries in background. When flag is set to `false`, expired entries will be removed on next entry access.
      Returns:
        Flag indicating whether Ignite will eagerly remove expired entries.

    - #### setEagerTtl

          public ClientCacheConfiguration setEagerTtl(boolean eagerTtl)

      Parameters:
        `eagerTtl` - `True` if Ignite should eagerly remove expired cache entries.

    - #### getGroupName

          public String getGroupName()

      Gets the cache group name.

      Caches with the same group name share single underlying 'physical' cache (partition set), but are logically isolated. Grouping caches reduces overall overhead, since internal data structures are shared.

    - #### setGroupName

          public ClientCacheConfiguration setGroupName(String newVal)

      Parameters:
        `newVal` - Group name.

    - #### getDefaultLockTimeout

          public long getDefaultLockTimeout()

      Gets default lock acquisition timeout. `0` and means that lock acquisition will never timeout.

    - #### setDefaultLockTimeout

          public ClientCacheConfiguration setDefaultLockTimeout(long dfltLockTimeout)

      Parameters:
        `dfltLockTimeout` - Default lock timeout.

    - #### getPartitionLossPolicy

          public PartitionLossPolicy getPartitionLossPolicy()

      Gets partition loss policy. This policy defines how Ignite will react to a situation when all nodes for some partition leave the cluster.

    - #### setPartitionLossPolicy

          public ClientCacheConfiguration setPartitionLossPolicy(PartitionLossPolicy newVal)

      Parameters:
        `newVal` - Partition loss policy.

    - #### isReadFromBackup

          public boolean isReadFromBackup()

      Gets flag indicating whether data can be read from backup. If `false` always get data from primary node (never from backup).

    - #### setReadFromBackup

          public ClientCacheConfiguration setReadFromBackup(boolean readFromBackup)

      Parameters:
        `readFromBackup` - Read from backup.

    - #### getRebalanceBatchSize

          public int getRebalanceBatchSize()

      Gets size (in number bytes) to be loaded within a single rebalance message. Rebalancing algorithm will split total data set on every node into multiple batches prior to sending data.

    - #### setRebalanceBatchSize

          public ClientCacheConfiguration setRebalanceBatchSize(int rebalanceBatchSize)

      Parameters:
        `rebalanceBatchSize` - Rebalance batch size.

    - #### getRebalanceBatchesPrefetchCount

          public long getRebalanceBatchesPrefetchCount()

      To gain better rebalancing performance supplier node can provide more than one batch at rebalancing start and provide one new to each next demand request. Gets number of batches generated by supply node at rebalancing start. Minimum is 1.

    - #### setRebalanceBatchesPrefetchCount

          public ClientCacheConfiguration setRebalanceBatchesPrefetchCount(long rebalanceBatchesPrefetchCnt)

      Parameters:
        `rebalanceBatchesPrefetchCnt` - Rebalance batches prefetch count.

    - #### getRebalanceDelay

          public long getRebalanceDelay()

      Gets delay in milliseconds upon a node joining or leaving topology (or crash) after which rebalancing should be started automatically. Rebalancing should be delayed if you plan to restart nodes after they leave topology, or if you plan to start multiple nodes at once or one after another and don't want to repartition and rebalance until all nodes are started.

      Default value is `0` which means that repartitioning and rebalancing will start immediately upon node leaving topology. If `-1` is returned, then rebalancing will only be started manually.

    - #### setRebalanceDelay

          public ClientCacheConfiguration setRebalanceDelay(long rebalanceDelay)

      Parameters:
        `rebalanceDelay` - Rebalance delay.

    - #### getRebalanceMode

          public CacheRebalanceMode getRebalanceMode()

      Gets rebalance mode.

    - #### setRebalanceMode

          public ClientCacheConfiguration setRebalanceMode(CacheRebalanceMode rebalanceMode)

      Parameters:
        `rebalanceMode` - Rebalance mode.

    - #### getRebalanceOrder

          public int getRebalanceOrder()

      Gets cache rebalance order. Rebalance order can be set to non-zero value for caches with `SYNC` or `ASYNC` rebalance modes only.

      If cache rebalance order is positive, rebalancing for this cache will be started only when rebalancing for all caches with smaller rebalance order will be completed.

      Note that cache with order `0` does not participate in ordering. This means that cache with rebalance order `0` will never wait for any other caches. All caches with order `0` will be rebalanced right away concurrently with each other and ordered rebalance processes.

      If not set, cache order is 0, i.e. rebalancing is not ordered.

    - #### setRebalanceOrder

          public ClientCacheConfiguration setRebalanceOrder(int rebalanceOrder)

      Parameters:
        `rebalanceOrder` - Rebalance order.

    - #### getRebalanceThrottle

          public long getRebalanceThrottle()

      Time in milliseconds to wait between rebalance messages to avoid overloading of CPU or network. When rebalancing large data sets, the CPU or network can get over-consumed with rebalancing messages, which consecutively may slow down the application performance. This parameter helps tune the amount of time to wait between rebalance messages to make sure that rebalancing process does not have any negative performance impact. Note that application will continue to work properly while rebalancing is still in progress.

      Default value of `0` means that throttling is disabled.

    - #### setRebalanceThrottle

          public ClientCacheConfiguration setRebalanceThrottle(long newVal)

      Parameters:
        `newVal` - Rebalance throttle.

    - #### getRebalanceTimeout

          public long getRebalanceTimeout()

      Gets rebalance timeout (ms).

    - #### setRebalanceTimeout

          public ClientCacheConfiguration setRebalanceTimeout(long newVal)

      Parameters:
        `newVal` - Rebalance timeout.

    - #### getWriteSynchronizationMode

          public CacheWriteSynchronizationMode getWriteSynchronizationMode()

      Gets write synchronization mode. This mode controls whether the main caller should wait for update on other nodes to complete or not.

    - #### setWriteSynchronizationMode

          public ClientCacheConfiguration setWriteSynchronizationMode(CacheWriteSynchronizationMode newVal)

      Parameters:
        `newVal` - Write synchronization mode.

    - #### isCopyOnRead

          public boolean isCopyOnRead()

      Returns:
        Copy on read.

    - #### setCopyOnRead

          public ClientCacheConfiguration setCopyOnRead(boolean newVal)

      Parameters:
        `newVal` - Copy on read.

    - #### getMaxConcurrentAsyncOperations

          public int getMaxConcurrentAsyncOperations()

      Returns:
        Max concurrent async operations.

    - #### setMaxConcurrentAsyncOperations

          public ClientCacheConfiguration setMaxConcurrentAsyncOperations(int newVal)

      Parameters:
        `newVal` - Max concurrent async operations.

    - #### getDataRegionName

          public String getDataRegionName()

      Returns:
        Data region name.

    - #### setDataRegionName

          public ClientCacheConfiguration setDataRegionName(String newVal)

      Parameters:
        `newVal` - Data region name.

    - #### isStatisticsEnabled

          public boolean isStatisticsEnabled()

      Returns:
        Statistics enabled.

    - #### setStatisticsEnabled

          public ClientCacheConfiguration setStatisticsEnabled(boolean newVal)

      Parameters:
        `newVal` - Statistics enabled.

    - #### getMaxQueryIteratorsCount

          public int getMaxQueryIteratorsCount()

      Returns:
        Max query iterators count.

    - #### setMaxQueryIteratorsCount

          public ClientCacheConfiguration setMaxQueryIteratorsCount(int newVal)

      Parameters:
        `newVal` - Max query iterators count.

    - #### isOnheapCacheEnabled

          public boolean isOnheapCacheEnabled()

      Returns:
        Onheap cache enabled.

    - #### setOnheapCacheEnabled

          public ClientCacheConfiguration setOnheapCacheEnabled(boolean newVal)

      Parameters:
        `newVal` - Onheap cache enabled.

    - #### getQueryDetailMetricsSize

          public int getQueryDetailMetricsSize()

      Returns:
        Query detail metrics size.

    - #### setQueryDetailMetricsSize

          public ClientCacheConfiguration setQueryDetailMetricsSize(int newVal)

      Parameters:
        `newVal` - Query detail metrics size.

    - #### getQueryParallelism

          public int getQueryParallelism()

      Returns:
        Query parallelism.

    - #### setQueryParallelism

          public ClientCacheConfiguration setQueryParallelism(int newVal)

      Parameters:
        `newVal` - Query parallelism.

    - #### isSqlEscapeAll

          public boolean isSqlEscapeAll()

      Returns:
        Sql escape all.

    - #### setSqlEscapeAll

          public ClientCacheConfiguration setSqlEscapeAll(boolean newVal)

      Parameters:
        `newVal` - Sql escape all.

    - #### getSqlIndexMaxInlineSize

          public int getSqlIndexMaxInlineSize()

      Returns:
        Sql index max inline size.

    - #### setSqlIndexMaxInlineSize

          public ClientCacheConfiguration setSqlIndexMaxInlineSize(int newVal)

      Parameters:
        `newVal` - Sql index max inline size.

    - #### getSqlSchema

          public String getSqlSchema()

      Returns:
        Sql schema.

    - #### setSqlSchema

          public ClientCacheConfiguration setSqlSchema(String newVal)

      Parameters:
        `newVal` - Sql schema.

    - #### getKeyConfiguration

          public CacheKeyConfiguration[] getKeyConfiguration()

      Returns:
        Cache key configuration.

    - #### setKeyConfiguration

          public ClientCacheConfiguration setKeyConfiguration(CacheKeyConfiguration... newVal)

      Parameters:
        `newVal` - Cache key configuration.

    - #### getQueryEntities

          public QueryEntity[] getQueryEntities()

      Returns:
        Query entities configurations.

    - #### setQueryEntities

          public ClientCacheConfiguration setQueryEntities(QueryEntity... newVal)

      Parameters:
        `newVal` - Query entities configurations.

    - #### getExpiryPolicy

          public javax.cache.expiry.ExpiryPolicy getExpiryPolicy()

      Returns:
        Expire policy.

    - #### setExpiryPolicy

          public ClientCacheConfiguration setExpiryPolicy(javax.cache.expiry.ExpiryPolicy expiryPlc)

      Parameters:
        `expiryPlc` - Expiry policy.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021