public class IgniteCacheOptions extends Object
Constructor and Description |
---|
IgniteCacheOptions()
Default constructor
|
IgniteCacheOptions(IgniteCacheOptions options)
Copy constructor
|
IgniteCacheOptions(JsonObject options)
Constructor from JSON
|
Modifier and Type | Method and Description |
---|---|
String |
getAtomicityMode()
Gets cache atomicity mode.
|
int |
getBackups()
Gets number of nodes used to back up single partition for PARTITIONED cache.
|
String |
getCacheMode()
Gets caching mode to use.
|
JsonObject |
getExpiryPolicy()
Gets cache expiry policy object.
|
String |
getGroupName()
Gets the cache group name.
|
int |
getMaxConcurrentAsyncOperations()
Gets maximum number of allowed concurrent asynchronous operations.
|
int |
getMaxQueryInteratorsCount()
Gets maximum number of query iterators that can be stored.
|
String |
getName()
Cache name.
|
String |
getPartitionLossPolicy()
Gets partition loss policy.
|
long |
getRebalanceDelay()
Deprecated.
Use baseline topology feature instead. Please, be aware this API will be removed in the next releases.
|
String |
getRebalanceMode()
Gets rebalance mode for distributed cache.
|
int |
getRebalanceOrder()
Gets cache rebalance order.
|
String |
getWriteSynchronizationMode()
Gets write synchronization mode.
|
boolean |
isCopyOnRead()
Gets the flag indicating whether a copy of the value stored in the on-heap cache
should be created for a cache operation return the value.
|
boolean |
isEagerTtl()
Gets flag indicating whether expired cache entries will be eagerly removed from cache.
|
boolean |
isEncryptionEnabled()
Gets flag indicating whether data must be encrypted.
|
boolean |
isEventsDisabled()
Checks whether events are disabled for this cache.
|
boolean |
isInvalidate()
Invalidation flag.
|
boolean |
isMetricsEnabled() |
boolean |
isOnheapCacheEnabled()
Checks if the on-heap cache is enabled for the off-heap based page memory.
|
boolean |
isReadFromBackup()
Gets flag indicating whether data can be read from backup.
|
IgniteCacheOptions |
setAtomicityMode(String atomicityMode)
Sets cache atomicity mode.
|
IgniteCacheOptions |
setBackups(int backups)
Sets number of nodes used to back up single partition for PARTITIONED cache.
|
IgniteCacheOptions |
setCacheMode(String cacheMode)
Sets caching mode.
|
IgniteCacheOptions |
setCopyOnRead(boolean copyOnRead)
Sets copy on read flag.
|
IgniteCacheOptions |
setEagerTtl(boolean eagerTtl)
Sets eager ttl flag.
|
IgniteCacheOptions |
setEncryptionEnabled(boolean encryptionEnabled)
Sets encrypted flag.
|
IgniteCacheOptions |
setEventsDisabled(boolean eventsDisabled)
Sets events disabled flag.
|
IgniteCacheOptions |
setExpiryPolicy(JsonObject expiryPolicy)
Sets cache expiry policy object.
|
IgniteCacheOptions |
setGroupName(String groupName)
Sets the cache group name.
|
IgniteCacheOptions |
setInvalidate(boolean invalidate)
Sets invalidation flag for near cache entries in this transaction.
|
IgniteCacheOptions |
setMaxConcurrentAsyncOperations(int maxConcurrentAsyncOperations)
Sets maximum number of concurrent asynchronous operations.
|
IgniteCacheOptions |
setMaxQueryInteratorsCount(int maxQueryInteratorsCount)
Sets maximum number of query iterators that can be stored.
|
IgniteCacheOptions |
setMetricsEnabled(boolean metricsEnabled)
Sets cache metrics enabled/disabled.
|
IgniteCacheOptions |
setName(String name)
Sets cache name.
|
IgniteCacheOptions |
setOnheapCacheEnabled(boolean onheapCacheEnabled)
Configures on-heap cache for the off-heap based page memory.
|
IgniteCacheOptions |
setPartitionLossPolicy(String partitionLossPolicy)
Sets partition loss policy.
|
IgniteCacheOptions |
setReadFromBackup(boolean readFromBackup)
Sets read from backup flag.
|
IgniteCacheOptions |
setRebalanceDelay(long rebalanceDelay)
Deprecated.
Use baseline topology feature instead. Please, be aware this API will be removed in the next releases.
|
IgniteCacheOptions |
setRebalanceMode(String rebalanceMode)
Sets cache rebalance mode.
|
IgniteCacheOptions |
setRebalanceOrder(int rebalanceOrder)
Sets cache rebalance order.
|
IgniteCacheOptions |
setWriteSynchronizationMode(String writeSynchronizationMode)
Sets write synchronization mode.
|
JsonObject |
toJson()
Convert to JSON
|
public IgniteCacheOptions()
public IgniteCacheOptions(IgniteCacheOptions options)
options
- the one to copypublic IgniteCacheOptions(JsonObject options)
options
- the JSONpublic String getName()
public IgniteCacheOptions setName(String name)
name
- Cache name. Can not be null or empty.public String getCacheMode()
public IgniteCacheOptions setCacheMode(String cacheMode)
cacheMode
- Caching mode.public int getBackups()
public IgniteCacheOptions setBackups(int backups)
backups
- Number of backup nodes for one partition.public boolean isReadFromBackup()
false
always get data from primary node (never from backup).true
if data can be read from backup node or false
if data always
should be read from primary node and never from backup.public IgniteCacheOptions setReadFromBackup(boolean readFromBackup)
readFromBackup
- true
to allow reads from backups.public String getAtomicityMode()
public IgniteCacheOptions setAtomicityMode(String atomicityMode)
atomicityMode
- Cache atomicity mode.public String getWriteSynchronizationMode()
public IgniteCacheOptions setWriteSynchronizationMode(String writeSynchronizationMode)
writeSynchronizationMode
- Write synchronization mode.public boolean isCopyOnRead()
public IgniteCacheOptions setCopyOnRead(boolean copyOnRead)
copyOnRead
- Copy on get flag.public boolean isEagerTtl()
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.public IgniteCacheOptions setEagerTtl(boolean eagerTtl)
eagerTtl
- True
if Ignite should eagerly remove expired cache entries.public boolean isEncryptionEnabled()
True
if this cache persistent data is encrypted.public IgniteCacheOptions setEncryptionEnabled(boolean encryptionEnabled)
encryptionEnabled
- True
if this cache persistent data should be encrypted.public String getGroupName()
public IgniteCacheOptions setGroupName(String groupName)
groupName
- Cache group name.public boolean isInvalidate()
true
, values will be invalidated (nullified) upon commit in near cache.public IgniteCacheOptions setInvalidate(boolean invalidate)
false
.invalidate
- Flag to set this cache into invalidation-based mode. Default value is false
.public int getMaxConcurrentAsyncOperations()
0
if unlimited.public IgniteCacheOptions setMaxConcurrentAsyncOperations(int maxConcurrentAsyncOperations)
maxConcurrentAsyncOperations
- Maximum number of concurrent asynchronous operations.public boolean isOnheapCacheEnabled()
public IgniteCacheOptions setOnheapCacheEnabled(boolean onheapCacheEnabled)
onheapCacheEnabled
- True
if on-heap cache should be enabled.public String getPartitionLossPolicy()
public IgniteCacheOptions setPartitionLossPolicy(String partitionLossPolicy)
partitionLossPolicy
- Partition loss policy.public String getRebalanceMode()
public IgniteCacheOptions setRebalanceMode(String rebalanceMode)
rebalanceMode
- Rebalance mode.public int getRebalanceOrder()
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.public IgniteCacheOptions setRebalanceOrder(int rebalanceOrder)
rebalanceOrder
- Cache rebalance order.@Deprecated public long getRebalanceDelay()
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 by calling rebalance() method or from management console.0
to start rebalancing immediately, -1
to
start rebalancing manually, or positive value to specify delay in milliseconds
after which rebalancing should start automatically.@Deprecated public IgniteCacheOptions setRebalanceDelay(long rebalanceDelay)
rebalanceDelay
- Rebalance delay to set.public int getMaxQueryInteratorsCount()
public IgniteCacheOptions setMaxQueryInteratorsCount(int maxQueryInteratorsCount)
maxQueryInteratorsCount
- Maximum number of query iterators that can be stored.public boolean isEventsDisabled()
public IgniteCacheOptions setEventsDisabled(boolean eventsDisabled)
eventsDisabled
- Events disabled flag.public JsonObject getExpiryPolicy()
public IgniteCacheOptions setExpiryPolicy(JsonObject expiryPolicy)
expiryPolicy
- Json representation of expiry policys.public boolean isMetricsEnabled()
public IgniteCacheOptions setMetricsEnabled(boolean metricsEnabled)
metricsEnabled
- to set.public JsonObject toJson()
Copyright © 2023 Eclipse. All rights reserved.