public class NearCacheConfiguration<K,V> extends Object implements Serializable
Distributed cache can also be fronted by a Near cache, which is a smaller local cache that stores most recently or most frequently accessed data. Just like with a partitioned cache, the user can control the size of the near cache and its eviction policies.
Constructor and Description |
---|
NearCacheConfiguration()
Empty constructor.
|
NearCacheConfiguration(NearCacheConfiguration<K,V> ccfg)
Creates near cache configuration copying properties from passed in configuration.
|
Modifier and Type | Method and Description |
---|---|
EvictionPolicy<K,V> |
getNearEvictionPolicy()
Gets near eviction policy.
|
int |
getNearStartSize()
Gets initial cache size for near cache which will be used to pre-create internal
hash table after start.
|
NearCacheConfiguration<K,V> |
setNearEvictionPolicy(EvictionPolicy<K,V> nearEvictPlc)
Sets near eviction policy.
|
NearCacheConfiguration<K,V> |
setNearStartSize(int nearStartSize)
Start size for near cache.
|
String |
toString() |
public NearCacheConfiguration()
public NearCacheConfiguration(NearCacheConfiguration<K,V> ccfg)
ccfg
- Configuration to copy.public EvictionPolicy<K,V> getNearEvictionPolicy()
null
which means that evictions are disabled for near cache.CacheConfiguration.getEvictionPolicy()
public NearCacheConfiguration<K,V> setNearEvictionPolicy(EvictionPolicy<K,V> nearEvictPlc)
nearEvictPlc
- Near eviction policy.this
for chaining.public int getNearStartSize()
CacheConfiguration.DFLT_NEAR_START_SIZE
.public NearCacheConfiguration<K,V> setNearStartSize(int nearStartSize)
CacheMode.PARTITIONED
caching mode.nearStartSize
- Start size for near cache.this
for chaining.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017