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()
Deprecated.
Use
getNearEvictionPolicyFactory() instead. |
javax.cache.configuration.Factory<EvictionPolicy<? super K,? super V>> |
getNearEvictionPolicyFactory()
Gets cache eviction policy factory.
|
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)
Deprecated.
Use
setNearEvictionPolicyFactory(Factory) instead. |
NearCacheConfiguration<K,V> |
setNearEvictionPolicyFactory(javax.cache.configuration.Factory<? extends EvictionPolicy<? super K,? super V>> nearEvictPlcFactory)
Sets cache eviction policy factory.
|
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.@Deprecated public EvictionPolicy<K,V> getNearEvictionPolicy()
getNearEvictionPolicyFactory()
instead.null
which means that evictions are disabled for near cache.CacheConfiguration.getEvictionPolicy()
@Deprecated public NearCacheConfiguration<K,V> setNearEvictionPolicy(EvictionPolicy<K,V> nearEvictPlc)
setNearEvictionPolicyFactory(Factory)
instead.nearEvictPlc
- Near eviction policy.this
for chaining.@Nullable public javax.cache.configuration.Factory<EvictionPolicy<? super K,? super V>> getNearEvictionPolicyFactory()
null
which means that evictions are disabled for cache.null
if evictions should be disabled.public NearCacheConfiguration<K,V> setNearEvictionPolicyFactory(@Nullable javax.cache.configuration.Factory<? extends EvictionPolicy<? super K,? super V>> nearEvictPlcFactory)
Serializable
.nearEvictPlcFactory
- Cache expiration 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.5.0 Release Date : May 23 2018