Class CacheConfiguration<K,V>
- java.lang.Object
-
- javax.cache.configuration.MutableConfiguration<K,V>
-
- org.apache.ignite.configuration.CacheConfiguration<K,V>
-
- All Implemented Interfaces:
Serializable,javax.cache.configuration.CompleteConfiguration<K,V>,javax.cache.configuration.Configuration<K,V>
public class CacheConfiguration<K,V> extends javax.cache.configuration.MutableConfiguration<K,V>This class defines grid cache configuration. This configuration is passed to grid viaIgniteConfiguration.getCacheConfiguration()method. It defines all configuration parameters required to start a cache within grid instance. You can have multiple caches configured with different names within one grid.Cache configuration is set on
IgniteConfiguration.setCacheConfiguration(CacheConfiguration...)method. This adapter is a simple bean and can be configured from Spring XML files (or other DI frameworks).Note that absolutely all configuration properties are optional, so users should only change what they need.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCacheConfiguration.IgniteAllNodesPredicateFilter that accepts all nodes.
-
Field Summary
Fields Modifier and Type Field Description static IgnitePredicate<ClusterNode>ALL_NODESFilter that accepts all nodes.static intDFLT_BACKUPSDefault number of backups.static CacheAtomicityModeDFLT_CACHE_ATOMICITY_MODEDefault atomicity mode.static CacheModeDFLT_CACHE_MODEDefault caching mode.static intDFLT_CACHE_SIZEDefault cache size to use with eviction policy.static intDFLT_CONCURRENT_LOAD_ALL_THRESHOLDDefault threshold for concurrent loading of keys fromCacheStore.static booleanDFLT_COPY_ON_READDefault value for 'copyOnRead' flag.static DiskPageCompressionDFLT_DISK_PAGE_COMPRESSIONDefault disk page compression algorithm.static booleanDFLT_EAGER_TTLDefault value for eager ttl flag.static booleanDFLT_EVENTS_DISABLEDDefault value for events disabled flag.static booleanDFLT_INVALIDATEDefault value for 'invalidate' flag that indicates if this is invalidation-based cache.static booleanDFLT_LOAD_PREV_VALDefault value for load previous value flag.static longDFLT_LOCK_TIMEOUTDeprecated.Default lock timeout configuration property has no effect.static longDFLT_LONG_QRY_WARN_TIMEOUTDeprecated.static intDFLT_MAX_CONCURRENT_ASYNC_OPSDefault value for 'maxConcurrentAsyncOps'.static intDFLT_MAX_QUERY_ITERATOR_CNTDefault maximum number of query iterators that can be stored.static intDFLT_NEAR_START_SIZEInitial default near cache size.static PartitionLossPolicyDFLT_PARTITION_LOSS_POLICYDefault partition loss policy.static intDFLT_QRY_DETAIL_METRICS_SIZEDefault number of queries detail metrics to collect.static intDFLT_QUERY_PARALLELISMDefault query parallelism.static booleanDFLT_READ_FROM_BACKUPDefault value for 'readFromBackup' flag.static intDFLT_REBALANCE_BATCH_SIZEDeprecated.UseIgniteConfiguration.DFLT_REBALANCE_BATCH_SIZEinstead.static longDFLT_REBALANCE_BATCHES_PREFETCH_COUNTDeprecated.static CacheRebalanceModeDFLT_REBALANCE_MODEDefault rebalance mode for distributed cache.static intDFLT_REBALANCE_THREAD_POOL_SIZEDeprecated.UseIgniteConfiguration.DFLT_REBALANCE_THREAD_POOL_SIZEinstead.static longDFLT_REBALANCE_THROTTLEDeprecated.UseIgniteConfiguration.DFLT_REBALANCE_THROTTLEinstead.static longDFLT_REBALANCE_TIMEOUTDeprecated.UseIgniteConfiguration.DFLT_REBALANCE_TIMEOUTinstead.static intDFLT_SQL_INDEX_MAX_INLINE_SIZEDefault maximum inline size for sql indexes.static intDFLT_SQL_ONHEAP_CACHE_MAX_SIZEDefault SQL on-heap cache size.static BooleanDFLT_STORE_KEEP_BINARYDefault value for keep binary in store behavior .static intDFLT_WRITE_BEHIND_BATCH_SIZEDefault batch size for write-behind cache store.static booleanDFLT_WRITE_BEHIND_COALESCINGDefault write coalescing for write-behind cache store.static intDFLT_WRITE_BEHIND_CRITICAL_SIZEDefault critical size used when flush size is not specified.static booleanDFLT_WRITE_BEHIND_ENABLEDDefault value for 'writeBehindEnabled' flag.static longDFLT_WRITE_BEHIND_FLUSH_FREQUENCYDefault flush frequency for write-behind cache store in milliseconds.static intDFLT_WRITE_BEHIND_FLUSH_SIZEDefault flush size for write-behind cache store.static intDFLT_WRITE_FROM_BEHIND_FLUSH_THREAD_CNTDefault count of flush threads for write-behind cache store.static intMAX_PARTITIONS_COUNTMaximum number of partitions.
-
Constructor Summary
Constructors Constructor Description CacheConfiguration()Empty constructor (all values are initialized to their defaults).CacheConfiguration(String name)CacheConfiguration(javax.cache.configuration.CompleteConfiguration<K,V> cfg)Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description javax.cache.configuration.MutableConfiguration<K,V>addCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryLsnrCfg)CacheConfiguration<K,V>clearQueryEntities()Clear query entities.AffinityFunctiongetAffinity()Gets key topology resolver to provide mapping from keys to nodes.AffinityKeyMappergetAffinityMapper()Affinity key mapper used to provide custom affinity key for any given key.CacheAtomicityModegetAtomicityMode()Gets cache atomicity mode.intgetBackups()Gets number of nodes used to back up single partition forCacheMode.PARTITIONEDcache.Iterable<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>>getCacheEntryListenerConfigurations()CacheModegetCacheMode()Gets caching mode to use.javax.cache.configuration.Factory<CacheStore<? super K,? super V>>getCacheStoreFactory()Gets factory for underlying persistent storage for read-through and write-through operations.javax.cache.configuration.Factory<? extends CacheStoreSessionListener>[]getCacheStoreSessionListenerFactories()Gets cache store session listener factories.@Nullable StringgetDataRegionName()longgetDefaultLockTimeout()Deprecated.Default lock timeout configuration property has no effect.DiskPageCompressiongetDiskPageCompression()Gets disk page compression algorithm.IntegergetDiskPageCompressionLevel()Getsalgorithmspecific disk page compression level.EvictionFilter<K,V>getEvictionFilter()Gets eviction filter to specify which entries should not be evicted (except explicit evict by callingIgniteCache.localEvict(Collection)).@Nullable EvictionPolicy<K,V>getEvictionPolicy()Deprecated.UsegetEvictionPolicyFactory()instead.@Nullable javax.cache.configuration.Factory<EvictionPolicy<? super K,? super V>>getEvictionPolicyFactory()Gets cache eviction policy factory.StringgetGroupName()Gets the cache group name.Class<?>[]getIndexedTypes()Array of key and value type pairs to be indexed (thus array length must be always even).@Nullable CacheInterceptor<K,V>getInterceptor()Gets cache interceptor.CacheKeyConfiguration[]getKeyConfiguration()Gets cache key configuration.longgetLongQueryWarningTimeout()Deprecated.UseIgniteConfiguration.getLongQueryWarningTimeout()instead.intgetMaxConcurrentAsyncOperations()Gets maximum number of allowed concurrent asynchronous operations.intgetMaxQueryIteratorsCount()Gets maximum number of query iterators that can be stored.StringgetMemoryPolicyName()Deprecated.UsegetDataRegionName()(String)} instead.StringgetName()Cache name.NearCacheConfiguration<K,V>getNearConfiguration()IgnitePredicate<ClusterNode>getNodeFilter()Gets filter which determines on what nodes the cache should be started.PartitionLossPolicygetPartitionLossPolicy()Gets partition loss policy.PlatformCacheConfigurationgetPlatformCacheConfiguration()Gets platform cache configuration.CachePluginConfiguration[]getPluginConfigurations()Gets array of cache plugin configurations.intgetQueryDetailMetricsSize()Gets size of queries detail metrics that will be stored in memory for monitoring purposes.Collection<QueryEntity>getQueryEntities()Gets a collection of configured query entities.intgetQueryParallelism()Defines a hint to query execution engine on desired degree of parallelism within a single node.longgetRebalanceBatchesPrefetchCount()Deprecated.intgetRebalanceBatchSize()Deprecated.UseIgniteConfiguration.getRebalanceBatchSize()instead.longgetRebalanceDelay()Deprecated.Use baseline topology feature instead.CacheRebalanceModegetRebalanceMode()Gets rebalance mode for distributed cache.intgetRebalanceOrder()Gets cache rebalance order.intgetRebalanceThreadPoolSize()Deprecated.longgetRebalanceThrottle()Deprecated.UseIgniteConfiguration.getRebalanceThrottle()instead.longgetRebalanceTimeout()Deprecated.UseIgniteConfiguration.getRebalanceTimeout()instead.@Nullable Class<?>[]getSqlFunctionClasses()Gets classes with methods annotated byQuerySqlFunctionto be used as user-defined functions from SQL queries.intgetSqlIndexMaxInlineSize()Gets maximum inline size for sql indexes.intgetSqlOnheapCacheMaxSize()Gets maximum SQL on-heap cache.@Nullable StringgetSqlSchema()Gets custom name of the sql schema.intgetStoreConcurrentLoadAllThreshold()Gets the threshold used in cases when values for multiple keys are being loaded from an underlyingCacheStorein parallel.TopologyValidatorgetTopologyValidator()Gets topology validator.StringgetTransactionManagerLookupClassName()Deprecated.UseTransactionConfiguration.getTxManagerFactory()instead.intgetWriteBehindBatchSize()Maximum batch size for write-behind cache store operations.booleangetWriteBehindCoalescing()Write coalescing flag for write-behind cache store operations.longgetWriteBehindFlushFrequency()Frequency with which write-behind cache is flushed to the cache store in milliseconds.intgetWriteBehindFlushSize()Maximum size of the write-behind cache.intgetWriteBehindFlushThreadCount()Number of threads that will perform cache flushing.CacheWriteSynchronizationModegetWriteSynchronizationMode()Gets write synchronization mode.booleanisCopyOnRead()Gets the flag indicating whether a copy of the value stored in the on-heap cache (seeisOnheapCacheEnabled()should be created for a cache operation return the value.booleanisEagerTtl()Gets flag indicating whether expired cache entries will be eagerly removed from cache.booleanisEncryptionEnabled()Gets flag indicating whether data must be encrypted.BooleanisEventsDisabled()Checks whether events are disabled for this cache.booleanisInvalidate()Invalidation flag.booleanisLoadPreviousValue()Gets flag indicating whether value should be loaded from store if it is not in the cache for following cache operations:IgniteCache.putIfAbsent(Object, Object)IgniteCache.replace(Object, Object)IgniteCache.replace(Object, Object, Object)IgniteCache.remove(Object, Object)IgniteCache.getAndPut(Object, Object)IgniteCache.getAndRemove(Object)IgniteCache.getAndReplace(Object, Object)IgniteCache.getAndPutIfAbsent(Object, Object)booleanisOnheapCacheEnabled()Checks if the on-heap cache is enabled for the off-heap based page memory.booleanisReadFromBackup()Gets flag indicating whether data can be read from backup.booleanisSqlEscapeAll()Iftrueall the SQL table and field names will be escaped with double quotes like ("tableName"."fieldsName").booleanisSqlOnheapCacheEnabled()Gets whether SQL on-heap cache is enabled.BooleanisStoreKeepBinary()Flag indicating thatCacheStoreimplementation is working with binary objects instead of Java objects.booleanisWriteBehindEnabled()Flag indicating whether Ignite should use write-behind behaviour for the cache store.javax.cache.configuration.MutableConfiguration<K,V>removeCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryLsnrCfg)CacheConfiguration<K,V>setAffinity(AffinityFunction aff)Sets affinity for cache keys.CacheConfiguration<K,V>setAffinityMapper(AffinityKeyMapper affMapper)Sets custom affinity mapper.CacheConfiguration<K,V>setAtomicityMode(CacheAtomicityMode atomicityMode)Sets cache atomicity mode.CacheConfiguration<K,V>setBackups(int backups)Sets number of nodes used to back up single partition forCacheMode.PARTITIONEDcache.CacheConfiguration<K,V>setCacheLoaderFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheLoader<K,V>> factory)CacheConfiguration<K,V>setCacheMode(CacheMode cacheMode)Sets caching mode.CacheConfiguration<K,V>setCacheStoreFactory(javax.cache.configuration.Factory<? extends CacheStore<? super K,? super V>> storeFactory)Sets factory for persistent storage for cache data.CacheConfiguration<K,V>setCacheStoreSessionListenerFactories(javax.cache.configuration.Factory<? extends CacheStoreSessionListener>... storeSesLsnrs)Cache store session listener factories.CacheConfiguration<K,V>setCacheWriterFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheWriter<? super K,? super V>> factory)CacheConfiguration<K,V>setCopyOnRead(boolean cpOnRead)Sets copy on read flag.CacheConfiguration<K,V>setDataRegionName(@Nullable String dataRegionName)Sets a name ofDataRegionConfigurationfor this cache.CacheConfiguration<K,V>setDefaultLockTimeout(long dfltLockTimeout)Deprecated.Default lock timeout configuration property has no effect.CacheConfiguration<K,V>setDiskPageCompression(DiskPageCompression diskPageCompression)Sets disk page compression algorithm.CacheConfiguration<K,V>setDiskPageCompressionLevel(Integer diskPageCompressionLevel)Setsalgorithmspecific disk page compression level.CacheConfiguration<K,V>setEagerTtl(boolean eagerTtl)Sets eager ttl flag.CacheConfiguration<K,V>setEncryptionEnabled(boolean encryptionEnabled)Sets encrypted flag.CacheConfiguration<K,V>setEventsDisabled(boolean evtsDisabled)Sets events disabled flag.CacheConfiguration<K,V>setEvictionFilter(EvictionFilter<K,V> evictFilter)Sets eviction filter.CacheConfiguration<K,V>setEvictionPolicy(@Nullable EvictionPolicy evictPlc)Deprecated.UsesetEvictionPolicyFactory(Factory)instead.CacheConfiguration<K,V>setEvictionPolicyFactory(@Nullable javax.cache.configuration.Factory<? extends EvictionPolicy<? super K,? super V>> evictPlcFactory)Sets cache eviction policy factory.CacheConfiguration<K,V>setExpiryPolicyFactory(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> factory)CacheConfiguration<K,V>setGroupName(String grpName)Sets the cache group name.CacheConfiguration<K,V>setIndexedTypes(Class<?>... indexedTypes)Array of key and value type pairs to be indexed (thus array length must be always even).CacheConfiguration<K,V>setInterceptor(CacheInterceptor<K,V> interceptor)Sets cache interceptor.CacheConfiguration<K,V>setInvalidate(boolean invalidate)Sets invalidation flag for near cache entries in this transaction.CacheConfiguration<K,V>setKeyConfiguration(CacheKeyConfiguration... cacheKeyCfg)Sets cache key configuration.CacheConfiguration<K,V>setLoadPreviousValue(boolean loadPrevVal)Sets flag indicating whether value should be loaded from store if it is not in the cache for following cache operations:IgniteCache.putIfAbsent(Object, Object)IgniteCache.replace(Object, Object)IgniteCache.replace(Object, Object, Object)IgniteCache.remove(Object, Object)IgniteCache.getAndPut(Object, Object)IgniteCache.getAndRemove(Object)IgniteCache.getAndReplace(Object, Object)IgniteCache.getAndPutIfAbsent(Object, Object)When not set, default value isDFLT_LOAD_PREV_VAL.CacheConfiguration<K,V>setLongQueryWarningTimeout(long longQryWarnTimeout)Deprecated.UseIgniteConfiguration.setLongQueryWarningTimeout(long)instead.CacheConfiguration<K,V>setManagementEnabled(boolean enabled)CacheConfiguration<K,V>setMaxConcurrentAsyncOperations(int maxConcurrentAsyncOps)Sets maximum number of concurrent asynchronous operations.CacheConfiguration<K,V>setMaxQueryIteratorsCount(int maxQryIterCnt)Sets maximum number of query iterators that can be stored.CacheConfiguration<K,V>setMemoryPolicyName(String memPlcName)Deprecated.UsesetDataRegionName(String)instead.CacheConfiguration<K,V>setName(String name)Sets cache name.CacheConfiguration<K,V>setNearConfiguration(NearCacheConfiguration<K,V> nearCfg)Sets the near cache configuration to use on all cache nodes.CacheConfiguration<K,V>setNodeFilter(IgnitePredicate<ClusterNode> nodeFilter)Sets filter which determines on what nodes the cache should be started.CacheConfiguration<K,V>setOnheapCacheEnabled(boolean onheapCache)Configures on-heap cache for the off-heap based page memory.CacheConfiguration<K,V>setPartitionLossPolicy(PartitionLossPolicy partLossPlc)Sets partition loss policy.CacheConfiguration<K,V>setPlatformCacheConfiguration(PlatformCacheConfiguration platformCfg)Sets platform cache configuration.CacheConfiguration<K,V>setPluginConfigurations(CachePluginConfiguration... pluginCfgs)Sets cache plugin configurations.CacheConfiguration<K,V>setQueryDetailMetricsSize(int qryDetailMetricsSz)Sets size of queries detail metrics that will be stored in memory for monitoring purposes.CacheConfiguration<K,V>setQueryEntities(Collection<QueryEntity> qryEntities)Sets query entities configuration.CacheConfiguration<K,V>setQueryParallelism(int qryParallelism)Sets query parallelism.CacheConfiguration<K,V>setReadFromBackup(boolean readFromBackup)Sets read from backup flag.CacheConfiguration<K,V>setReadThrough(boolean isReadThrough)CacheConfiguration<K,V>setRebalanceBatchesPrefetchCount(long rebalanceBatchesCnt)Deprecated.CacheConfiguration<K,V>setRebalanceBatchSize(int rebalanceBatchSize)Deprecated.UseIgniteConfiguration.setRebalanceBatchSize(int)instead.CacheConfiguration<K,V>setRebalanceDelay(long rebalanceDelay)Deprecated.Use baseline topology feature instead.CacheConfiguration<K,V>setRebalanceMode(CacheRebalanceMode rebalanceMode)Sets cache rebalance mode.CacheConfiguration<K,V>setRebalanceOrder(int rebalanceOrder)Sets cache rebalance order.CacheConfiguration<K,V>setRebalanceThreadPoolSize(int rebalancePoolSize)Deprecated.CacheConfiguration<K,V>setRebalanceThrottle(long rebalanceThrottle)Deprecated.UseIgniteConfiguration.setRebalanceThrottle(long)instead.CacheConfiguration<K,V>setRebalanceTimeout(long rebalanceTimeout)Deprecated.UseIgniteConfiguration.setRebalanceTimeout(long)instead.CacheConfiguration<K,V>setSqlEscapeAll(boolean sqlEscapeAll)Iftrueall the SQL table and field names will be escaped with double quotes like ("tableName"."fieldsName").CacheConfiguration<K,V>setSqlFunctionClasses(Class<?>... cls)Sets classes with methods annotated byQuerySqlFunctionto be used as user-defined functions from SQL queries.CacheConfiguration<K,V>setSqlIndexMaxInlineSize(int sqlIdxMaxInlineSize)Sets maximum inline size for sql indexes.CacheConfiguration<K,V>setSqlOnheapCacheEnabled(boolean sqlOnheapCache)Sets whether SQL on-heap cache is enabled.CacheConfiguration<K,V>setSqlOnheapCacheMaxSize(int sqlOnheapCacheMaxSize)Sets maximum SQL on-heap cache.CacheConfiguration<K,V>setSqlSchema(String sqlSchema)Sets sql schema to be used for current cache.CacheConfiguration<K,V>setStatisticsEnabled(boolean enabled)CacheConfiguration<K,V>setStoreByValue(boolean isStoreByVal)CacheConfiguration<K,V>setStoreConcurrentLoadAllThreshold(int storeConcurrentLoadAllThreshold)Sets the concurrent load-all threshold used for cases when keys' values are being loaded fromCacheStorein parallel.CacheConfiguration<K,V>setStoreKeepBinary(boolean storeKeepBinary)Sets keep binary in store flag.CacheConfiguration<K,V>setTopologyValidator(TopologyValidator topValidator)Sets topology validator.CacheConfiguration<K,V>setTransactionManagerLookupClassName(String tmLookupClsName)Deprecated.CacheConfiguration<K,V>setTypes(Class<K> keyType, Class<V> valType)CacheConfiguration<K,V>setWriteBehindBatchSize(int writeBehindBatchSize)Sets maximum batch size for write-behind cache.CacheConfiguration<K,V>setWriteBehindCoalescing(boolean writeBehindCoalescing)Sets write coalescing flag for write-behind cache.CacheConfiguration<K,V>setWriteBehindEnabled(boolean writeBehindEnabled)Sets flag indicating whether write-behind is enabled.CacheConfiguration<K,V>setWriteBehindFlushFrequency(long writeBehindFlushFreq)Sets write-behind flush frequency.CacheConfiguration<K,V>setWriteBehindFlushSize(int writeBehindFlushSize)Sets write-behind flush size.CacheConfiguration<K,V>setWriteBehindFlushThreadCount(int writeBehindFlushThreadCnt)Sets flush thread count for write-behind cache.CacheConfiguration<K,V>setWriteSynchronizationMode(CacheWriteSynchronizationMode writeSync)Sets write synchronization mode.CacheConfiguration<K,V>setWriteThrough(boolean isWriteThrough)StringtoString()protected ObjectwriteReplace()Creates a copy of current configuration and removes all cache entry listeners.
-
-
-
Field Detail
-
MAX_PARTITIONS_COUNT
public static final int MAX_PARTITIONS_COUNT
Maximum number of partitions.- See Also:
- Constant Field Values
-
DFLT_REBALANCE_THREAD_POOL_SIZE
@Deprecated public static final int DFLT_REBALANCE_THREAD_POOL_SIZE
Deprecated.UseIgniteConfiguration.DFLT_REBALANCE_THREAD_POOL_SIZEinstead.Default size of rebalance thread pool.
-
DFLT_REBALANCE_TIMEOUT
@Deprecated public static final long DFLT_REBALANCE_TIMEOUT
Deprecated.UseIgniteConfiguration.DFLT_REBALANCE_TIMEOUTinstead.Default rebalance timeout (ms).- See Also:
- Constant Field Values
-
DFLT_REBALANCE_BATCHES_PREFETCH_COUNT
@Deprecated public static final long DFLT_REBALANCE_BATCHES_PREFETCH_COUNT
Deprecated.Default rebalance batches prefetch count.- See Also:
- Constant Field Values
-
DFLT_REBALANCE_THROTTLE
@Deprecated public static final long DFLT_REBALANCE_THROTTLE
Deprecated.UseIgniteConfiguration.DFLT_REBALANCE_THROTTLEinstead.Time in milliseconds to wait between rebalance messages to avoid overloading CPU.- See Also:
- Constant Field Values
-
DFLT_BACKUPS
public static final int DFLT_BACKUPS
Default number of backups.- See Also:
- Constant Field Values
-
DFLT_CACHE_MODE
public static final CacheMode DFLT_CACHE_MODE
Default caching mode.
-
DFLT_CACHE_ATOMICITY_MODE
public static final CacheAtomicityMode DFLT_CACHE_ATOMICITY_MODE
Default atomicity mode.
-
DFLT_LOCK_TIMEOUT
@Deprecated public static final long DFLT_LOCK_TIMEOUT
Deprecated.Default lock timeout configuration property has no effect.Default lock timeout.- See Also:
- Constant Field Values
-
DFLT_CACHE_SIZE
public static final int DFLT_CACHE_SIZE
Default cache size to use with eviction policy.- See Also:
- Constant Field Values
-
DFLT_SQL_INDEX_MAX_INLINE_SIZE
public static final int DFLT_SQL_INDEX_MAX_INLINE_SIZE
Default maximum inline size for sql indexes.- See Also:
- Constant Field Values
-
DFLT_NEAR_START_SIZE
public static final int DFLT_NEAR_START_SIZE
Initial default near cache size.- See Also:
- Constant Field Values
-
DFLT_INVALIDATE
public static final boolean DFLT_INVALIDATE
Default value for 'invalidate' flag that indicates if this is invalidation-based cache.- See Also:
- Constant Field Values
-
DFLT_REBALANCE_MODE
public static final CacheRebalanceMode DFLT_REBALANCE_MODE
Default rebalance mode for distributed cache.
-
DFLT_REBALANCE_BATCH_SIZE
@Deprecated public static final int DFLT_REBALANCE_BATCH_SIZE
Deprecated.UseIgniteConfiguration.DFLT_REBALANCE_BATCH_SIZEinstead.Default rebalance batch size in bytes.- See Also:
- Constant Field Values
-
DFLT_EAGER_TTL
public static final boolean DFLT_EAGER_TTL
Default value for eager ttl flag.- See Also:
- Constant Field Values
-
DFLT_MAX_CONCURRENT_ASYNC_OPS
public static final int DFLT_MAX_CONCURRENT_ASYNC_OPS
Default value for 'maxConcurrentAsyncOps'.- See Also:
- Constant Field Values
-
DFLT_WRITE_BEHIND_ENABLED
public static final boolean DFLT_WRITE_BEHIND_ENABLED
Default value for 'writeBehindEnabled' flag.- See Also:
- Constant Field Values
-
DFLT_WRITE_BEHIND_FLUSH_SIZE
public static final int DFLT_WRITE_BEHIND_FLUSH_SIZE
Default flush size for write-behind cache store.- See Also:
- Constant Field Values
-
DFLT_WRITE_BEHIND_CRITICAL_SIZE
public static final int DFLT_WRITE_BEHIND_CRITICAL_SIZE
Default critical size used when flush size is not specified.- See Also:
- Constant Field Values
-
DFLT_WRITE_BEHIND_FLUSH_FREQUENCY
public static final long DFLT_WRITE_BEHIND_FLUSH_FREQUENCY
Default flush frequency for write-behind cache store in milliseconds.- See Also:
- Constant Field Values
-
DFLT_WRITE_FROM_BEHIND_FLUSH_THREAD_CNT
public static final int DFLT_WRITE_FROM_BEHIND_FLUSH_THREAD_CNT
Default count of flush threads for write-behind cache store.- See Also:
- Constant Field Values
-
DFLT_WRITE_BEHIND_BATCH_SIZE
public static final int DFLT_WRITE_BEHIND_BATCH_SIZE
Default batch size for write-behind cache store.- See Also:
- Constant Field Values
-
DFLT_WRITE_BEHIND_COALESCING
public static final boolean DFLT_WRITE_BEHIND_COALESCING
Default write coalescing for write-behind cache store.- See Also:
- Constant Field Values
-
DFLT_MAX_QUERY_ITERATOR_CNT
public static final int DFLT_MAX_QUERY_ITERATOR_CNT
Default maximum number of query iterators that can be stored.- See Also:
- Constant Field Values
-
DFLT_LOAD_PREV_VAL
public static final boolean DFLT_LOAD_PREV_VAL
Default value for load previous value flag.- See Also:
- Constant Field Values
-
DFLT_READ_FROM_BACKUP
public static final boolean DFLT_READ_FROM_BACKUP
Default value for 'readFromBackup' flag.- See Also:
- Constant Field Values
-
ALL_NODES
public static final IgnitePredicate<ClusterNode> ALL_NODES
Filter that accepts all nodes.
-
DFLT_LONG_QRY_WARN_TIMEOUT
@Deprecated public static final long DFLT_LONG_QRY_WARN_TIMEOUT
Deprecated.Default timeout after which long query warning will be printed.- See Also:
- Constant Field Values
-
DFLT_QRY_DETAIL_METRICS_SIZE
public static final int DFLT_QRY_DETAIL_METRICS_SIZE
Default number of queries detail metrics to collect.- See Also:
- Constant Field Values
-
DFLT_STORE_KEEP_BINARY
public static final Boolean DFLT_STORE_KEEP_BINARY
Default value for keep binary in store behavior .
-
DFLT_CONCURRENT_LOAD_ALL_THRESHOLD
public static final int DFLT_CONCURRENT_LOAD_ALL_THRESHOLD
Default threshold for concurrent loading of keys fromCacheStore.- See Also:
- Constant Field Values
-
DFLT_PARTITION_LOSS_POLICY
public static final PartitionLossPolicy DFLT_PARTITION_LOSS_POLICY
Default partition loss policy.
-
DFLT_QUERY_PARALLELISM
public static final int DFLT_QUERY_PARALLELISM
Default query parallelism.- See Also:
- Constant Field Values
-
DFLT_EVENTS_DISABLED
public static final boolean DFLT_EVENTS_DISABLED
Default value for events disabled flag.- See Also:
- Constant Field Values
-
DFLT_SQL_ONHEAP_CACHE_MAX_SIZE
public static final int DFLT_SQL_ONHEAP_CACHE_MAX_SIZE
Default SQL on-heap cache size.- See Also:
- Constant Field Values
-
DFLT_DISK_PAGE_COMPRESSION
public static final DiskPageCompression DFLT_DISK_PAGE_COMPRESSION
Default disk page compression algorithm.
-
DFLT_COPY_ON_READ
public static final boolean DFLT_COPY_ON_READ
Default value for 'copyOnRead' flag.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CacheConfiguration
public CacheConfiguration()
Empty constructor (all values are initialized to their defaults).
-
CacheConfiguration
public CacheConfiguration(String name)
- Parameters:
name- Cache name.
-
-
Method Detail
-
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. Since underlying cache is shared, the following configuration properties should be the same within group:setAffinity(AffinityFunction),setNodeFilter(IgnitePredicate),cacheMode,setTopologyValidator(TopologyValidator),setPartitionLossPolicy(PartitionLossPolicy),setDataRegionName(String). Grouping caches reduces overall overhead, since internal data structures are shared.- Returns:
- Cache group name.
-
setGroupName
public CacheConfiguration<K,V> setGroupName(String grpName)
Sets the cache group name. Caches with the same group name share single underlying 'physical' cache (partition set), but are logically isolated. Since underlying cache is shared, the following configuration properties should be the same within group:setAffinity(AffinityFunction),setNodeFilter(IgnitePredicate),cacheMode,setTopologyValidator(TopologyValidator),setPartitionLossPolicy(PartitionLossPolicy),setDataRegionName(String). Grouping caches reduces overall overhead, since internal data structures are shared.- Parameters:
grpName- Cache group name.- Returns:
thisfor chaining.
-
getName
public String getName()
Cache name. The cache will be accessed viaIgnite.cache(String)method.- Returns:
- Cache name.
-
setName
public CacheConfiguration<K,V> setName(String name)
Sets cache name.- Parameters:
name- Cache name. Can not be null or empty.- Returns:
thisfor chaining.
-
getDataRegionName
@Nullable public @Nullable String getDataRegionName()
- Returns:
DataRegionConfigurationname.
-
getMemoryPolicyName
@Deprecated public String getMemoryPolicyName()
Deprecated.UsegetDataRegionName()(String)} instead.- Returns:
- Name of the memory policy.
-
setDataRegionName
public CacheConfiguration<K,V> setDataRegionName(@Nullable @Nullable String dataRegionName)
Sets a name ofDataRegionConfigurationfor this cache.- Parameters:
dataRegionName- DataRegionConfiguration name. Can be null (default DataRegionConfiguration will be used) but should not be empty.- Returns:
thisfor chaining.
-
setMemoryPolicyName
@Deprecated public CacheConfiguration<K,V> setMemoryPolicyName(String memPlcName)
Deprecated.UsesetDataRegionName(String)instead.- Parameters:
memPlcName- Memory policy name.- Returns:
thisfor chaining.
-
getEvictionPolicy
@Deprecated @Nullable public @Nullable EvictionPolicy<K,V> getEvictionPolicy()
Deprecated.UsegetEvictionPolicyFactory()instead.Gets cache eviction policy. By default, returnsnullwhich means that evictions are disabled for cache.- Returns:
- Cache eviction policy or
nullif evictions should be disabled.
-
setEvictionPolicy
@Deprecated public CacheConfiguration<K,V> setEvictionPolicy(@Nullable @Nullable EvictionPolicy evictPlc)
Deprecated.UsesetEvictionPolicyFactory(Factory)instead.Sets cache eviction policy.- Parameters:
evictPlc- Cache eviction policy.- Returns:
thisfor chaining.
-
getEvictionPolicyFactory
@Nullable public @Nullable javax.cache.configuration.Factory<EvictionPolicy<? super K,? super V>> getEvictionPolicyFactory()
Gets cache eviction policy factory. By default, returnsnullwhich means that evictions are disabled for cache.- Returns:
- Cache eviction policy factory or
nullif evictions should be disabled or ifgetEvictionPolicy()should be used instead.
-
setEvictionPolicyFactory
public CacheConfiguration<K,V> setEvictionPolicyFactory(@Nullable @Nullable javax.cache.configuration.Factory<? extends EvictionPolicy<? super K,? super V>> evictPlcFactory)
Sets cache eviction policy factory. Note: Eviction policy factory should beSerializable.- Parameters:
evictPlcFactory- Cache eviction policy factory.- Returns:
thisfor chaining.
-
isOnheapCacheEnabled
public boolean isOnheapCacheEnabled()
Checks if the on-heap cache is enabled for the off-heap based page memory.- Returns:
- On-heap cache enabled flag.
-
setOnheapCacheEnabled
public CacheConfiguration<K,V> setOnheapCacheEnabled(boolean onheapCache)
Configures on-heap cache for the off-heap based page memory.- Parameters:
onheapCache-Trueif on-heap cache should be enabled.- Returns:
thisfor chaining.
-
isSqlOnheapCacheEnabled
public boolean isSqlOnheapCacheEnabled()
Gets whether SQL on-heap cache is enabled. When enabled, Ignite will cache SQL rows as they are accessed by query engine. Rows are invalidated and evicted from cache when relevant cache entry is either changed or evicted.- Returns:
- Whether SQL onheap cache is enabled.
-
setSqlOnheapCacheEnabled
public CacheConfiguration<K,V> setSqlOnheapCacheEnabled(boolean sqlOnheapCache)
Sets whether SQL on-heap cache is enabled. When enabled, Ignite will cache SQL rows as they are accessed by query engine. Rows are invalidated and evicted from cache when relevant cache entry is either changed or evicted.- Parameters:
sqlOnheapCache- Whether SQL onheap cache is enabled.- Returns:
thisfor chaining.
-
getSqlOnheapCacheMaxSize
public int getSqlOnheapCacheMaxSize()
Gets maximum SQL on-heap cache. Measured in number of rows. When maximum size is reached oldest cached rows will be evicted.Zero or negative value stand for unlimited size.
Defaults to
DFLT_SQL_ONHEAP_CACHE_MAX_SIZE.- Returns:
- SQL on-heap cache max size.
-
setSqlOnheapCacheMaxSize
public CacheConfiguration<K,V> setSqlOnheapCacheMaxSize(int sqlOnheapCacheMaxSize)
Sets maximum SQL on-heap cache. Measured in number of rows. When maximum size is reached oldest cached rows will be evicted.Zero or negative value stand for unlimited size.
Defaults to
DFLT_SQL_ONHEAP_CACHE_MAX_SIZE.- Parameters:
sqlOnheapCacheMaxSize- Maximum SQL on-heap cache.- Returns:
thisfor chaining.
-
getNearConfiguration
public NearCacheConfiguration<K,V> getNearConfiguration()
- Returns:
- Near enabled flag.
-
setNearConfiguration
public CacheConfiguration<K,V> setNearConfiguration(NearCacheConfiguration<K,V> nearCfg)
Sets the near cache configuration to use on all cache nodes.- Parameters:
nearCfg- Near cache configuration.- Returns:
thisfor chaining.
-
getPlatformCacheConfiguration
public PlatformCacheConfiguration getPlatformCacheConfiguration()
Gets platform cache configuration.- Returns:
- Platform cache configuration or null.
-
setPlatformCacheConfiguration
public CacheConfiguration<K,V> setPlatformCacheConfiguration(PlatformCacheConfiguration platformCfg)
Sets platform cache configuration. Enables native platform (only .NET currently) cache when not null. Cache entries will be stored in deserialized form in native platform memory (e.g. .NET objects in CLR heap).When enabled on server nodes, all primary keys will be stored in platform memory as well.
Same eviction policy applies to near cache entries for all keys on client nodes and non-primary keys on server nodes.
Enabling this can greatly improve performance for key-value operations and scan queries, at the expense of RAM usage.
- Parameters:
platformCfg- Platform cache configuration.- Returns:
thisfor chaining.
-
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.- Returns:
- Write synchronization mode.
-
setWriteSynchronizationMode
public CacheConfiguration<K,V> setWriteSynchronizationMode(CacheWriteSynchronizationMode writeSync)
Sets write synchronization mode.Default synchronization mode is
CacheWriteSynchronizationMode.PRIMARY_SYNC.- Parameters:
writeSync- Write synchronization mode.- Returns:
thisfor chaining.
-
getNodeFilter
public IgnitePredicate<ClusterNode> getNodeFilter()
Gets filter which determines on what nodes the cache should be started.- Returns:
- Predicate specifying on which nodes the cache should be started.
-
setNodeFilter
public CacheConfiguration<K,V> setNodeFilter(IgnitePredicate<ClusterNode> nodeFilter)
Sets filter which determines on what nodes the cache should be started.- Parameters:
nodeFilter- Predicate specifying on which nodes the cache should be started.- Returns:
thisfor chaining.
-
getEvictionFilter
public EvictionFilter<K,V> getEvictionFilter()
Gets eviction filter to specify which entries should not be evicted (except explicit evict by callingIgniteCache.localEvict(Collection)). IfEvictionFilter.evictAllowed(Cache.Entry)method returnsfalsethen eviction policy will not be notified and entry will never be evicted.If not provided, any entry may be evicted depending on
getEvictionPolicyFactory()eviction policy} configuration.- Returns:
- Eviction filter or
null.
-
setEvictionFilter
public CacheConfiguration<K,V> setEvictionFilter(EvictionFilter<K,V> evictFilter)
Sets eviction filter.- Parameters:
evictFilter- Eviction filter.- Returns:
thisfor chaining.
-
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 totrue, Ignite will create a single thread to clean up expired entries in background. When flag is set tofalse, expired entries will be removed on next entry access.When not set, default value is
DFLT_EAGER_TTL.Note that this flag only matters for entries expiring based on
ExpiryPolicyand should not be confused with entry evictions based on configuredEvictionPolicy.- Returns:
- Flag indicating whether Ignite will eagerly remove expired entries.
-
setEagerTtl
public CacheConfiguration<K,V> setEagerTtl(boolean eagerTtl)
Sets eager ttl flag.- Parameters:
eagerTtl-Trueif Ignite should eagerly remove expired cache entries.- Returns:
thisfor chaining.- See Also:
isEagerTtl()
-
isLoadPreviousValue
public boolean isLoadPreviousValue()
Gets flag indicating whether value should be loaded from store if it is not in the cache for following cache operations:IgniteCache.putIfAbsent(Object, Object)IgniteCache.replace(Object, Object)IgniteCache.replace(Object, Object, Object)IgniteCache.remove(Object, Object)IgniteCache.getAndPut(Object, Object)IgniteCache.getAndRemove(Object)IgniteCache.getAndReplace(Object, Object)IgniteCache.getAndPutIfAbsent(Object, Object)
- Returns:
- Load previous value flag.
-
setLoadPreviousValue
public CacheConfiguration<K,V> setLoadPreviousValue(boolean loadPrevVal)
Sets flag indicating whether value should be loaded from store if it is not in the cache for following cache operations:IgniteCache.putIfAbsent(Object, Object)IgniteCache.replace(Object, Object)IgniteCache.replace(Object, Object, Object)IgniteCache.remove(Object, Object)IgniteCache.getAndPut(Object, Object)IgniteCache.getAndRemove(Object)IgniteCache.getAndReplace(Object, Object)IgniteCache.getAndPutIfAbsent(Object, Object)
DFLT_LOAD_PREV_VAL.- Parameters:
loadPrevVal- Load previous value flag.- Returns:
thisfor chaining.
-
getCacheStoreFactory
public javax.cache.configuration.Factory<CacheStore<? super K,? super V>> getCacheStoreFactory()
Gets factory for underlying persistent storage for read-through and write-through operations.- Returns:
- Cache store factory.
-
setCacheStoreFactory
public CacheConfiguration<K,V> setCacheStoreFactory(javax.cache.configuration.Factory<? extends CacheStore<? super K,? super V>> storeFactory)
Sets factory for persistent storage for cache data.- Parameters:
storeFactory- Cache store factory.- Returns:
thisfor chaining.
-
isStoreKeepBinary
public Boolean isStoreKeepBinary()
Flag indicating thatCacheStoreimplementation is working with binary objects instead of Java objects. Default value of this flag isDFLT_STORE_KEEP_BINARY.If set to
false, Ignite will deserialize keys and values stored in binary format before they are passed to cache store.Note that setting this flag to
falsecan simplify store implementation in some cases, but it can cause performance degradation due to additional serializations and deserializations of binary objects. You will also need to have key and value classes on all nodes since binary will be deserialized when store is called.- Returns:
- Keep binary in store flag.
-
setStoreKeepBinary
public CacheConfiguration<K,V> setStoreKeepBinary(boolean storeKeepBinary)
Sets keep binary in store flag.- Parameters:
storeKeepBinary- Keep binary in store flag.- Returns:
thisfor chaining.
-
getStoreConcurrentLoadAllThreshold
public int getStoreConcurrentLoadAllThreshold()
Gets the threshold used in cases when values for multiple keys are being loaded from an underlyingCacheStorein parallel. In the situation when several threads load the same or intersecting set of keys and the total number of keys to load is less or equal to this threshold then there will be no a second call to the storage in order to load a key from thread A if the same key is already being loaded by thread B. The threshold should be controlled wisely. On the one hand if it's set to a big value then the interaction with a storage during the load of missing keys will be minimal. On the other hand the big value may result in significant performance degradation because it is needed to check for every key whether it's being loaded or not. When not set, default value isDFLT_CONCURRENT_LOAD_ALL_THRESHOLD.- Returns:
- The concurrent load-all threshold.
-
setStoreConcurrentLoadAllThreshold
public CacheConfiguration<K,V> setStoreConcurrentLoadAllThreshold(int storeConcurrentLoadAllThreshold)
Sets the concurrent load-all threshold used for cases when keys' values are being loaded fromCacheStorein parallel.- Parameters:
storeConcurrentLoadAllThreshold- The concurrent load-all threshold.- Returns:
thisfor chaining.
-
getAffinity
public AffinityFunction getAffinity()
Gets key topology resolver to provide mapping from keys to nodes.- Returns:
- Key topology resolver to provide mapping from keys to nodes.
-
setAffinity
public CacheConfiguration<K,V> setAffinity(AffinityFunction aff)
Sets affinity for cache keys.- Parameters:
aff- Cache key affinity.- Returns:
thisfor chaining.
-
getCacheMode
public CacheMode getCacheMode()
Gets caching mode to use. You can configure cache either to be local-only, fully replicated, partitioned, or near. If not provided,CacheMode.PARTITIONEDmode will be used by default (defined byDFLT_CACHE_MODEconstant).- Returns:
Trueif cache is local.
-
setCacheMode
public CacheConfiguration<K,V> setCacheMode(CacheMode cacheMode)
Sets caching mode.- Parameters:
cacheMode- Caching mode.- Returns:
thisfor chaining.
-
getAtomicityMode
public CacheAtomicityMode getAtomicityMode()
Gets cache atomicity mode.Default value is defined by
DFLT_CACHE_ATOMICITY_MODE.- Returns:
- Cache atomicity mode.
-
setAtomicityMode
public CacheConfiguration<K,V> setAtomicityMode(CacheAtomicityMode atomicityMode)
Sets cache atomicity mode.- Parameters:
atomicityMode- Cache atomicity mode.- Returns:
thisfor chaining.
-
getBackups
public int getBackups()
Gets number of nodes used to back up single partition forCacheMode.PARTITIONEDcache.If not set, default value is
DFLT_BACKUPS.- Returns:
- Number of backup nodes for one partition.
-
setBackups
public CacheConfiguration<K,V> setBackups(int backups)
Sets number of nodes used to back up single partition forCacheMode.PARTITIONEDcache.If not set, default value is
DFLT_BACKUPS.- Parameters:
backups- Number of backup nodes for one partition.- Returns:
thisfor chaining.
-
getDefaultLockTimeout
@Deprecated public long getDefaultLockTimeout()
Deprecated.Default lock timeout configuration property has no effect.Gets default lock acquisition timeout. Default value is defined byDFLT_LOCK_TIMEOUTwhich is0and means that lock acquisition will never timeout.- Returns:
- Default lock timeout.
-
setDefaultLockTimeout
@Deprecated public CacheConfiguration<K,V> setDefaultLockTimeout(long dfltLockTimeout)
Deprecated.Default lock timeout configuration property has no effect.Sets default lock timeout in milliseconds. By default this value is defined byDFLT_LOCK_TIMEOUT.- Parameters:
dfltLockTimeout- Default lock timeout.- Returns:
thisfor chaining.
-
isInvalidate
public boolean isInvalidate()
Invalidation flag. Iftrue, values will be invalidated (nullified) upon commit in near cache.- Returns:
- Invalidation flag.
-
setInvalidate
public CacheConfiguration<K,V> setInvalidate(boolean invalidate)
Sets invalidation flag for near cache entries in this transaction. Default isfalse.- Parameters:
invalidate- Flag to set this cache into invalidation-based mode. Default value isfalse.- Returns:
thisfor chaining.
-
getTransactionManagerLookupClassName
@Deprecated public String getTransactionManagerLookupClassName()
Deprecated.UseTransactionConfiguration.getTxManagerFactory()instead.Gets class name of transaction manager finder for integration for JEE app servers.- Returns:
- Transaction manager finder.
-
setTransactionManagerLookupClassName
@Deprecated public CacheConfiguration<K,V> setTransactionManagerLookupClassName(String tmLookupClsName)
Deprecated.Sets look up mechanism for availableTransactionManagerimplementation, if any.- Parameters:
tmLookupClsName- Name of class implementing GridCacheTmLookup interface that is used to receive JTA transaction manager.- Returns:
thisfor chaining.
-
setRebalanceMode
public CacheConfiguration<K,V> setRebalanceMode(CacheRebalanceMode rebalanceMode)
Sets cache rebalance mode.- Parameters:
rebalanceMode- Rebalance mode.- Returns:
thisfor chaining.
-
getRebalanceMode
public CacheRebalanceMode getRebalanceMode()
Gets rebalance mode for distributed cache.Default is defined by
DFLT_REBALANCE_MODE.- Returns:
- Rebalance mode.
-
getRebalanceOrder
public int getRebalanceOrder()
Gets cache rebalance order. Rebalance order can be set to non-zero value for caches withSYNCorASYNCrebalance modes only. Note that caches withSYNCrebalancing mode are always rebalanced prior to caches withASYNCrebalancing mode when rebalancing order is the same. The rebalance order guarantees that rebalancing for this cache will start only when rebalancing for all caches with smaller rebalance order will be completed. If not set, cache order is 0.- Returns:
- Cache rebalance order.
-
setRebalanceOrder
public CacheConfiguration<K,V> setRebalanceOrder(int rebalanceOrder)
Sets cache rebalance order.- Parameters:
rebalanceOrder- Cache rebalance order.- Returns:
thisfor chaining.- See Also:
getRebalanceOrder()
-
getRebalanceBatchSize
@Deprecated public int getRebalanceBatchSize()
Deprecated.UseIgniteConfiguration.getRebalanceBatchSize()instead.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. Default value is defined byDFLT_REBALANCE_BATCH_SIZE.- Returns:
- Size in bytes of a single rebalance message.
-
setRebalanceBatchSize
@Deprecated public CacheConfiguration<K,V> setRebalanceBatchSize(int rebalanceBatchSize)
Deprecated.UseIgniteConfiguration.setRebalanceBatchSize(int)instead.Sets rebalance batch size.- Parameters:
rebalanceBatchSize- Rebalance batch size.- Returns:
thisfor chaining.
-
getRebalanceBatchesPrefetchCount
@Deprecated public long getRebalanceBatchesPrefetchCount()
Deprecated.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.- Returns:
- batches count
-
setRebalanceBatchesPrefetchCount
@Deprecated public CacheConfiguration<K,V> setRebalanceBatchesPrefetchCount(long rebalanceBatchesCnt)
Deprecated.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. Sets number of batches generated by supply node at rebalancing start. Minimum is 1.- Parameters:
rebalanceBatchesCnt- batches count.- Returns:
thisfor chaining.
-
getMaxConcurrentAsyncOperations
public int getMaxConcurrentAsyncOperations()
Gets maximum number of allowed concurrent asynchronous operations. If 0 returned then number of concurrent asynchronous operations is unlimited.If not set, default value is
DFLT_MAX_CONCURRENT_ASYNC_OPS.If user threads do not wait for asynchronous operations to complete, it is possible to overload a system. This property enables back-pressure control by limiting number of scheduled asynchronous cache operations.
- Returns:
- Maximum number of concurrent asynchronous operations or
0if unlimited.
-
setMaxConcurrentAsyncOperations
public CacheConfiguration<K,V> setMaxConcurrentAsyncOperations(int maxConcurrentAsyncOps)
Sets maximum number of concurrent asynchronous operations.- Parameters:
maxConcurrentAsyncOps- Maximum number of concurrent asynchronous operations.- Returns:
thisfor chaining.- See Also:
getMaxConcurrentAsyncOperations()
-
getSqlIndexMaxInlineSize
public int getSqlIndexMaxInlineSize()
Gets maximum inline size for sql indexes. If -1 returned thenIgniteSystemProperties.IGNITE_MAX_INDEX_PAYLOAD_SIZEsystem property is used.If not set, default value is
DFLT_SQL_INDEX_MAX_INLINE_SIZE.- Returns:
- Maximum payload size for offheap indexes.
-
setSqlIndexMaxInlineSize
public CacheConfiguration<K,V> setSqlIndexMaxInlineSize(int sqlIdxMaxInlineSize)
Sets maximum inline size for sql indexes.- Parameters:
sqlIdxMaxInlineSize- Maximum inline size for sql indexes.- Returns:
thisfor chaining.
-
isWriteBehindEnabled
public boolean isWriteBehindEnabled()
Flag indicating whether Ignite should use write-behind behaviour for the cache store. By default write-behind is disabled which is defined viaDFLT_WRITE_BEHIND_ENABLEDconstant.- Returns:
Trueif write-behind is enabled.
-
setWriteBehindEnabled
public CacheConfiguration<K,V> setWriteBehindEnabled(boolean writeBehindEnabled)
Sets flag indicating whether write-behind is enabled.- Parameters:
writeBehindEnabled-trueif write-behind is enabled.- Returns:
thisfor chaining.
-
getWriteBehindFlushSize
public int getWriteBehindFlushSize()
Maximum size of the write-behind cache. If cache size exceeds this value, all cached items are flushed to the cache store and write cache is cleared. If not provided, default value isDFLT_WRITE_BEHIND_FLUSH_SIZE. If this value is0, then flush is performed according to the flush frequency interval. Note that you cannot set both,flushsize andflush frequency, to0.- Returns:
- Maximum object count in write-behind cache.
-
setWriteBehindFlushSize
public CacheConfiguration<K,V> setWriteBehindFlushSize(int writeBehindFlushSize)
Sets write-behind flush size.- Parameters:
writeBehindFlushSize- Write-behind cache flush size.- Returns:
thisfor chaining.- See Also:
getWriteBehindFlushSize()
-
getWriteBehindFlushFrequency
public long getWriteBehindFlushFrequency()
Frequency with which write-behind cache is flushed to the cache store in milliseconds. This value defines the maximum time interval between object insertion/deletion from the cache ant the moment when corresponding operation is applied to the cache store.If not provided, default value is
DFLT_WRITE_BEHIND_FLUSH_FREQUENCY. If this value is0, then flush is performed according to the flush size.Note that you cannot set both,
flushsize andflush frequency, to0.- Returns:
- Write-behind flush frequency in milliseconds.
-
setWriteBehindFlushFrequency
public CacheConfiguration<K,V> setWriteBehindFlushFrequency(long writeBehindFlushFreq)
Sets write-behind flush frequency.- Parameters:
writeBehindFlushFreq- Write-behind flush frequency in milliseconds.- Returns:
thisfor chaining.- See Also:
getWriteBehindFlushFrequency()
-
getWriteBehindFlushThreadCount
public int getWriteBehindFlushThreadCount()
Number of threads that will perform cache flushing. Cache flushing is performed when cache size exceeds value defined bygetWriteBehindFlushSize(), or flush interval defined bygetWriteBehindFlushFrequency()is elapsed. If not provided, default value isDFLT_WRITE_FROM_BEHIND_FLUSH_THREAD_CNT.- Returns:
- Count of flush threads.
-
setWriteBehindFlushThreadCount
public CacheConfiguration<K,V> setWriteBehindFlushThreadCount(int writeBehindFlushThreadCnt)
Sets flush thread count for write-behind cache.- Parameters:
writeBehindFlushThreadCnt- Count of flush threads.- Returns:
thisfor chaining.- See Also:
getWriteBehindFlushThreadCount()
-
getWriteBehindBatchSize
public int getWriteBehindBatchSize()
Maximum batch size for write-behind cache store operations. Store operations (get or remove) are combined in a batch of this size to be passed toCacheWriter.writeAll(Collection)orCacheWriter.deleteAll(Collection)methods. If not provided, default value isDFLT_WRITE_BEHIND_BATCH_SIZE.- Returns:
- Maximum batch size for store operations.
-
setWriteBehindBatchSize
public CacheConfiguration<K,V> setWriteBehindBatchSize(int writeBehindBatchSize)
Sets maximum batch size for write-behind cache.- Parameters:
writeBehindBatchSize- Maximum batch size.- Returns:
thisfor chaining.- See Also:
getWriteBehindBatchSize()
-
getWriteBehindCoalescing
public boolean getWriteBehindCoalescing()
Write coalescing flag for write-behind cache store operations. Store operations (get or remove) with the same key are combined or coalesced to single, resulting operation to reduce pressure to underlying cache store. If not provided, default value isDFLT_WRITE_BEHIND_COALESCING.- Returns:
- Write coalescing flag.
-
setWriteBehindCoalescing
public CacheConfiguration<K,V> setWriteBehindCoalescing(boolean writeBehindCoalescing)
Sets write coalescing flag for write-behind cache.- Parameters:
writeBehindCoalescing- Write coalescing flag.- Returns:
thisfor chaining.- See Also:
getWriteBehindCoalescing()
-
getRebalanceThreadPoolSize
@Deprecated public int getRebalanceThreadPoolSize()
Deprecated.UseIgniteConfiguration.getRebalanceThreadPoolSize()instead.- Returns:
- Size of rebalancing thread pool.
-
setRebalanceThreadPoolSize
@Deprecated public CacheConfiguration<K,V> setRebalanceThreadPoolSize(int rebalancePoolSize)
Deprecated.UseIgniteConfiguration.getRebalanceThreadPoolSize()instead.- Parameters:
rebalancePoolSize- Size of rebalancing thread pool.- Returns:
thisfor chaining.
-
getRebalanceTimeout
@Deprecated public long getRebalanceTimeout()
Deprecated.UseIgniteConfiguration.getRebalanceTimeout()instead.Gets rebalance timeout (ms).Default value is
DFLT_REBALANCE_TIMEOUT.- Returns:
- Rebalance timeout (ms).
-
setRebalanceTimeout
@Deprecated public CacheConfiguration<K,V> setRebalanceTimeout(long rebalanceTimeout)
Deprecated.UseIgniteConfiguration.setRebalanceTimeout(long)instead.Sets rebalance timeout (ms).- Parameters:
rebalanceTimeout- Rebalance timeout (ms).- Returns:
thisfor chaining.
-
getRebalanceDelay
@Deprecated public long getRebalanceDelay()
Deprecated.Use baseline topology feature instead. Please, be aware this API will be removed in the next releases.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.For better efficiency user should usually make sure that new nodes get placed on the same place of consistent hash ring as the left nodes, and that nodes are restarted before this delay expires. To place nodes on the same place in consistent hash ring, use
IgniteConfiguration.setConsistentId(Serializable)to make sure that a node maps to the same hash ID event if restarted. As an example, node IP address and port combination may be used in this case.Default value is
0which means that repartitioning and rebalancing will start immediately upon node leaving topology. If-1is returned, then rebalancing will only be started manually by callingIgniteCache.rebalance()method or from management console.- Returns:
- Rebalancing delay,
0to start rebalancing immediately,-1to start rebalancing manually, or positive value to specify delay in milliseconds after which rebalancing should start automatically.
-
setRebalanceDelay
@Deprecated public CacheConfiguration<K,V> setRebalanceDelay(long rebalanceDelay)
Deprecated.Use baseline topology feature instead. Please, be aware this API will be removed in the next releases.Sets rebalance delay (seegetRebalanceDelay()for more information).- Parameters:
rebalanceDelay- Rebalance delay to set.- Returns:
thisfor chaining.
-
getRebalanceThrottle
@Deprecated public long getRebalanceThrottle()
Deprecated.UseIgniteConfiguration.getRebalanceThrottle()instead.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.Value of
0means that throttling is disabled. By default throttling is disabled - the default is defined byDFLT_REBALANCE_THROTTLEconstant.- Returns:
- Time in milliseconds to wait between rebalance messages to avoid overloading of CPU,
0to disable throttling.
-
setRebalanceThrottle
@Deprecated public CacheConfiguration<K,V> setRebalanceThrottle(long rebalanceThrottle)
Deprecated.UseIgniteConfiguration.setRebalanceThrottle(long)instead.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.Value of
0means that throttling is disabled. By default throttling is disabled - the default is defined byDFLT_REBALANCE_THROTTLEconstant.- Parameters:
rebalanceThrottle- Time in milliseconds to wait between rebalance messages to avoid overloading of CPU,0to disable throttling.- Returns:
thisfor chaining.
-
getAffinityMapper
public AffinityKeyMapper getAffinityMapper()
Affinity key mapper used to provide custom affinity key for any given key. Affinity mapper is particularly useful when several objects need to be collocated on the same node (they will also be backed up on the same nodes as well).If not provided, then default implementation will be used. The default behavior is described in
AffinityKeyMapperdocumentation.- Returns:
- Mapper to use for affinity key mapping.
-
setAffinityMapper
public CacheConfiguration<K,V> setAffinityMapper(AffinityKeyMapper affMapper)
Sets custom affinity mapper. If not provided, then default implementation will be used. The default behavior is described inAffinityKeyMapperdocumentation.- Parameters:
affMapper- Affinity mapper.- Returns:
thisfor chaining.
-
getMaxQueryIteratorsCount
public int getMaxQueryIteratorsCount()
Gets maximum number of query iterators that can be stored. Iterators are stored to support query pagination when each page of data is sent to user's node only on demand. Increase this property if you are running and processing lots of queries in parallel.Default value is
DFLT_MAX_QUERY_ITERATOR_CNT.- Returns:
- Maximum number of query iterators that can be stored.
-
setMaxQueryIteratorsCount
public CacheConfiguration<K,V> setMaxQueryIteratorsCount(int maxQryIterCnt)
Sets maximum number of query iterators that can be stored.- Parameters:
maxQryIterCnt- Maximum number of query iterators that can be stored.- Returns:
thisfor chaining.
-
getInterceptor
@Nullable public @Nullable CacheInterceptor<K,V> getInterceptor()
Gets cache interceptor.- Returns:
- Cache interceptor.
-
setInterceptor
public CacheConfiguration<K,V> setInterceptor(CacheInterceptor<K,V> interceptor)
Sets cache interceptor.- Parameters:
interceptor- Cache interceptor.- Returns:
thisfor chaining.
-
isReadFromBackup
public boolean isReadFromBackup()
Gets flag indicating whether data can be read from backup. Iffalsealways get data from primary node (never from backup).Default value is defined by
DFLT_READ_FROM_BACKUP.- Returns:
trueif data can be read from backup node orfalseif data always should be read from primary node and never from backup.
-
setReadFromBackup
public CacheConfiguration<K,V> setReadFromBackup(boolean readFromBackup)
Sets read from backup flag.- Parameters:
readFromBackup-trueto allow reads from backups.- Returns:
thisfor chaining.
-
isCopyOnRead
public boolean isCopyOnRead()
Gets the flag indicating whether a copy of the value stored in the on-heap cache (seeisOnheapCacheEnabled()should be created for a cache operation return the value. Also if this flag is set copies are created for values passed toCacheInterceptorand toCacheEntryProcessor. If the on-heap cache is disabled then this flag is of no use.- Returns:
- Copy on read flag.
-
setCopyOnRead
public CacheConfiguration<K,V> setCopyOnRead(boolean cpOnRead)
Sets copy on read flag.- Parameters:
cpOnRead- Copy on get flag.- Returns:
thisfor chaining.- See Also:
isCopyOnRead()
-
setSqlFunctionClasses
public CacheConfiguration<K,V> setSqlFunctionClasses(Class<?>... cls)
Sets classes with methods annotated byQuerySqlFunctionto be used as user-defined functions from SQL queries.- Parameters:
cls- One or more classes with SQL functions.- Returns:
thisfor chaining.
-
getSqlFunctionClasses
@Nullable public @Nullable Class<?>[] getSqlFunctionClasses()
Gets classes with methods annotated byQuerySqlFunctionto be used as user-defined functions from SQL queries.- Returns:
- Classes with SQL functions.
-
getLongQueryWarningTimeout
@Deprecated public long getLongQueryWarningTimeout()
Deprecated.UseIgniteConfiguration.getLongQueryWarningTimeout()instead.Gets timeout in milliseconds after which long query warning will be printed.- Returns:
- Timeout in milliseconds.
-
setLongQueryWarningTimeout
@Deprecated public CacheConfiguration<K,V> setLongQueryWarningTimeout(long longQryWarnTimeout)
Deprecated.UseIgniteConfiguration.setLongQueryWarningTimeout(long)instead.Sets timeout in milliseconds after which long query warning will be printed.- Parameters:
longQryWarnTimeout- Timeout in milliseconds.- Returns:
thisfor chaining.
-
getQueryDetailMetricsSize
public int getQueryDetailMetricsSize()
Gets size of queries detail metrics that will be stored in memory for monitoring purposes. If0then history will not be collected. Note, larger number may lead to higher memory consumption.- Returns:
- Maximum number of query metrics that will be stored in memory.
-
setQueryDetailMetricsSize
public CacheConfiguration<K,V> setQueryDetailMetricsSize(int qryDetailMetricsSz)
Sets size of queries detail metrics that will be stored in memory for monitoring purposes.- Parameters:
qryDetailMetricsSz- Maximum number of latest queries metrics that will be stored in memory.- Returns:
thisfor chaining.
-
getSqlSchema
@Nullable public @Nullable String getSqlSchema()
Gets custom name of the sql schema. If custom sql schema is not set thennullwill be returned and quoted case sensitive name will be used as sql schema.- Returns:
- Schema name for current cache according to SQL ANSI-99. Could be
null.
-
setSqlSchema
public CacheConfiguration<K,V> setSqlSchema(String sqlSchema)
Sets sql schema to be used for current cache. This name will correspond to SQL ANSI-99 standard. Nonquoted identifiers are not case sensitive. Quoted identifiers are case sensitive. Be aware of using the same string in case sensitive and case insensitive manner simultaneously, since behaviour for such case is not specified. When sqlSchema is not specified, quotedcacheNameis used instead.sqlSchemacould not be an empty string. Has to be"\"\""instead.- Parameters:
sqlSchema- Schema name for current cache according to SQL ANSI-99. Should not benull.- Returns:
thisfor chaining.
-
isSqlEscapeAll
public boolean isSqlEscapeAll()
Iftrueall the SQL table and field names will be escaped with double quotes like ("tableName"."fieldsName"). This enforces case sensitivity for field names and also allows having special characters in table and field names.- Returns:
- Flag value.
-
setSqlEscapeAll
public CacheConfiguration<K,V> setSqlEscapeAll(boolean sqlEscapeAll)
Iftrueall the SQL table and field names will be escaped with double quotes like ("tableName"."fieldsName"). This enforces case sensitivity for field names and also allows having special characters in table and field names.- Parameters:
sqlEscapeAll- Flag value.- Returns:
thisfor chaining.
-
getIndexedTypes
public Class<?>[] getIndexedTypes()
Array of key and value type pairs to be indexed (thus array length must be always even). It means each even (0,2,4...) class in the array will be considered as key type for cache entry, each odd (1,3,5...) class will be considered as value type for cache entry.The same key class can occur multiple times for different value classes, but each value class must be unique because SQL table will be named as value class simple name.
To expose fields of these types onto SQL level and to index them you have to use annotations from package
org.apache.ignite.cache.query.annotations.- Returns:
- Key and value type pairs.
-
setIndexedTypes
public CacheConfiguration<K,V> setIndexedTypes(Class<?>... indexedTypes)
Array of key and value type pairs to be indexed (thus array length must be always even). It means each even (0,2,4...) class in the array will be considered as key type for cache entry, each odd (1,3,5...) class will be considered as value type for cache entry.The same key class can occur multiple times for different value classes, but each value class must be unique because SQL table will be named as value class simple name.
To expose fields of these types onto SQL level and to index them you have to use annotations from package
org.apache.ignite.cache.query.annotations.- Parameters:
indexedTypes- Key and value type pairs.- Returns:
thisfor chaining.
-
getPluginConfigurations
public CachePluginConfiguration[] getPluginConfigurations()
Gets array of cache plugin configurations.- Returns:
- Cache plugin configurations.
-
setPluginConfigurations
public CacheConfiguration<K,V> setPluginConfigurations(CachePluginConfiguration... pluginCfgs)
Sets cache plugin configurations.- Parameters:
pluginCfgs- Cache plugin configurations.- Returns:
thisfor chaining.
-
getQueryEntities
public Collection<QueryEntity> getQueryEntities()
Gets a collection of configured query entities.- Returns:
- Query entities configurations.
-
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.- Returns:
- Partition loss policy.
- See Also:
PartitionLossPolicy
-
setPartitionLossPolicy
public CacheConfiguration<K,V> setPartitionLossPolicy(PartitionLossPolicy partLossPlc)
Sets partition loss policy. This policy defines how Ignite will react to a situation when all nodes for some partition leave the cluster.- Parameters:
partLossPlc- Partition loss policy.- Returns:
thisfor chaining.- See Also:
PartitionLossPolicy
-
setQueryEntities
public CacheConfiguration<K,V> setQueryEntities(Collection<QueryEntity> qryEntities)
Sets query entities configuration.- Parameters:
qryEntities- Query entities.- Returns:
thisfor chaining.
-
clearQueryEntities
public CacheConfiguration<K,V> clearQueryEntities()
Clear query entities.- Returns:
thisfor chaining.
-
getQueryParallelism
public int getQueryParallelism()
Defines a hint to query execution engine on desired degree of parallelism within a single node. Query executor may or may not use this hint depending on estimated query costs. Query executor may define certain restrictions on parallelism depending on query type and/or cache type.As of
Apache Ignite 1.9this hint is only supported for SQL queries with the following restrictions:- All caches participating in query must have the same degree of parallelism, exception is thrown otherwise
- All queries on the given cache will follow provided degree of parallelism
Defaults to
DFLT_QUERY_PARALLELISM.- Returns:
- Query parallelism.
-
setQueryParallelism
public CacheConfiguration<K,V> setQueryParallelism(int qryParallelism)
Sets query parallelism.- Parameters:
qryParallelism- Query parallelism.- Returns:
thisfor chaining.- See Also:
getQueryParallelism()
-
getTopologyValidator
public TopologyValidator getTopologyValidator()
Gets topology validator.See
TopologyValidatorfor details.- Returns:
- validator.
-
setTopologyValidator
public CacheConfiguration<K,V> setTopologyValidator(TopologyValidator topValidator)
Sets topology validator.See
TopologyValidatorfor details.- Parameters:
topValidator- validator.- Returns:
thisfor chaining.
-
getCacheStoreSessionListenerFactories
public javax.cache.configuration.Factory<? extends CacheStoreSessionListener>[] getCacheStoreSessionListenerFactories()
Gets cache store session listener factories.- Returns:
- Cache store session listener factories.
- See Also:
CacheStoreSessionListener
-
setCacheStoreSessionListenerFactories
public CacheConfiguration<K,V> setCacheStoreSessionListenerFactories(javax.cache.configuration.Factory<? extends CacheStoreSessionListener>... storeSesLsnrs)
Cache store session listener factories.These listeners override global listeners provided in
IgniteConfiguration.setCacheStoreSessionListenerFactories(Factory[])configuration property.- Parameters:
storeSesLsnrs- Cache store session listener factories.- Returns:
thisfor chaining.- See Also:
CacheStoreSessionListener
-
getCacheEntryListenerConfigurations
public Iterable<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> getCacheEntryListenerConfigurations()
-
addCacheEntryListenerConfiguration
public javax.cache.configuration.MutableConfiguration<K,V> addCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryLsnrCfg)
-
removeCacheEntryListenerConfiguration
public javax.cache.configuration.MutableConfiguration<K,V> removeCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryLsnrCfg)
-
writeReplace
protected Object writeReplace()
Creates a copy of current configuration and removes all cache entry listeners. They are executed only locally and should never be sent to remote nodes.- Returns:
- Configuration object that will be serialized.
-
setStatisticsEnabled
public CacheConfiguration<K,V> setStatisticsEnabled(boolean enabled)
-
setManagementEnabled
public CacheConfiguration<K,V> setManagementEnabled(boolean enabled)
-
setCacheLoaderFactory
public CacheConfiguration<K,V> setCacheLoaderFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheLoader<K,V>> factory)
-
setCacheWriterFactory
public CacheConfiguration<K,V> setCacheWriterFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheWriter<? super K,? super V>> factory)
-
setExpiryPolicyFactory
public CacheConfiguration<K,V> setExpiryPolicyFactory(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> factory)
-
setReadThrough
public CacheConfiguration<K,V> setReadThrough(boolean isReadThrough)
-
setWriteThrough
public CacheConfiguration<K,V> setWriteThrough(boolean isWriteThrough)
-
setStoreByValue
public CacheConfiguration<K,V> setStoreByValue(boolean isStoreByVal)
-
isEventsDisabled
public Boolean isEventsDisabled()
Checks whether events are disabled for this cache.- Returns:
- Events disabled flag.
-
setEventsDisabled
public CacheConfiguration<K,V> setEventsDisabled(boolean evtsDisabled)
Sets events disabled flag.- Parameters:
evtsDisabled- Events disabled flag.- Returns:
thisfor chaining.
-
getKeyConfiguration
public CacheKeyConfiguration[] getKeyConfiguration()
Gets cache key configuration.- Returns:
- Cache key configuration.
-
setKeyConfiguration
public CacheConfiguration<K,V> setKeyConfiguration(CacheKeyConfiguration... cacheKeyCfg)
Sets cache key configuration.- Parameters:
cacheKeyCfg- Cache key configuration.- Returns:
thisfor chaining.
-
isEncryptionEnabled
public boolean isEncryptionEnabled()
Gets flag indicating whether data must be encrypted.- Returns:
Trueif this cache persistent data is encrypted.
-
setEncryptionEnabled
public CacheConfiguration<K,V> setEncryptionEnabled(boolean encryptionEnabled)
Sets encrypted flag.- Parameters:
encryptionEnabled-Trueif this cache persistent data should be encrypted.- Returns:
thisfor chaining.
-
getDiskPageCompression
public DiskPageCompression getDiskPageCompression()
Gets disk page compression algorithm. Makes sense only with enabledpersistence.- Returns:
- Disk page compression algorithm.
- See Also:
getDiskPageCompressionLevel()
-
setDiskPageCompression
public CacheConfiguration<K,V> setDiskPageCompression(DiskPageCompression diskPageCompression)
Sets disk page compression algorithm. Makes sense only with enabledpersistence.- Parameters:
diskPageCompression- Disk page compression algorithm.- Returns:
thisfor chaining.- See Also:
setDiskPageCompressionLevel(java.lang.Integer)
-
getDiskPageCompressionLevel
public Integer getDiskPageCompressionLevel()
Getsalgorithmspecific disk page compression level.- Returns:
- Disk page compression level or
nullfor default.
-
setDiskPageCompressionLevel
public CacheConfiguration<K,V> setDiskPageCompressionLevel(Integer diskPageCompressionLevel)
Setsalgorithmspecific disk page compression level.
-
-