Package org.apache.ignite.configuration
Class NearCacheConfiguration<K,V>
- java.lang.Object
- 
- org.apache.ignite.configuration.NearCacheConfiguration<K,V>
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class NearCacheConfiguration<K,V> extends Object implements Serializable Client (near) cache configuration.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. - See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description NearCacheConfiguration()Empty constructor.NearCacheConfiguration(NearCacheConfiguration<K,V> ccfg)Creates near cache configuration copying properties from passed in configuration.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description EvictionPolicy<K,V>getNearEvictionPolicy()Deprecated.UsegetNearEvictionPolicyFactory()instead.@Nullable javax.cache.configuration.Factory<EvictionPolicy<? super K,? super V>>getNearEvictionPolicyFactory()Gets cache eviction policy factory.intgetNearStartSize()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.UsesetNearEvictionPolicyFactory(Factory)instead.NearCacheConfiguration<K,V>setNearEvictionPolicyFactory(@Nullable 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.StringtoString()
 
- 
- 
- 
Constructor Detail- 
NearCacheConfigurationpublic NearCacheConfiguration() Empty constructor.
 - 
NearCacheConfigurationpublic NearCacheConfiguration(NearCacheConfiguration<K,V> ccfg) Creates near cache configuration copying properties from passed in configuration.- Parameters:
- ccfg- Configuration to copy.
 
 
- 
 - 
Method Detail- 
getNearEvictionPolicy@Deprecated public EvictionPolicy<K,V> getNearEvictionPolicy() Deprecated.UsegetNearEvictionPolicyFactory()instead.Gets near eviction policy. By default, returnsnullwhich means that evictions are disabled for near cache.- Returns:
- Near eviction policy.
- See Also:
- CacheConfiguration.getEvictionPolicy()
 
 - 
setNearEvictionPolicy@Deprecated public NearCacheConfiguration<K,V> setNearEvictionPolicy(EvictionPolicy<K,V> nearEvictPlc) Deprecated.UsesetNearEvictionPolicyFactory(Factory)instead.Sets near eviction policy.- Parameters:
- nearEvictPlc- Near eviction policy.
- Returns:
- thisfor chaining.
 
 - 
getNearEvictionPolicyFactory@Nullable public @Nullable javax.cache.configuration.Factory<EvictionPolicy<? super K,? super V>> getNearEvictionPolicyFactory() Gets cache eviction policy factory. By default, returnsnullwhich means that evictions are disabled for cache.- Returns:
- Cache eviction policy or nullif evictions should be disabled.
 
 - 
setNearEvictionPolicyFactorypublic NearCacheConfiguration<K,V> setNearEvictionPolicyFactory(@Nullable @Nullable javax.cache.configuration.Factory<? extends EvictionPolicy<? super K,? super V>> nearEvictPlcFactory) Sets cache eviction policy factory. Note: Eviction policy factory should beSerializable.- Parameters:
- nearEvictPlcFactory- Cache expiration policy.
- Returns:
- thisfor chaining.
 
 - 
getNearStartSizepublic int getNearStartSize() Gets initial cache size for near cache which will be used to pre-create internal hash table after start. Default value is defined byCacheConfiguration.DFLT_NEAR_START_SIZE.- Returns:
- Initial near cache size.
 
 - 
setNearStartSizepublic NearCacheConfiguration<K,V> setNearStartSize(int nearStartSize) Start size for near cache. This property is only used forCacheMode.PARTITIONEDcaching mode.- Parameters:
- nearStartSize- Start size for near cache.
- Returns:
- thisfor chaining.
 
 
- 
 
-