本文整理汇总了Java中org.apache.ignite.configuration.CacheConfiguration.setQueryDetailMetricsSize方法的典型用法代码示例。如果您正苦于以下问题:Java CacheConfiguration.setQueryDetailMetricsSize方法的具体用法?Java CacheConfiguration.setQueryDetailMetricsSize怎么用?Java CacheConfiguration.setQueryDetailMetricsSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.ignite.configuration.CacheConfiguration
的用法示例。
在下文中一共展示了CacheConfiguration.setQueryDetailMetricsSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configureCache
import org.apache.ignite.configuration.CacheConfiguration; //导入方法依赖的package包/类
/**
* @param cacheName Cache name.
* @return Cache configuration.
*/
private CacheConfiguration<Integer, String> configureCache(String cacheName) {
CacheConfiguration<Integer, String> ccfg = defaultCacheConfiguration();
ccfg.setName(cacheName);
ccfg.setCacheMode(cacheMode);
ccfg.setWriteSynchronizationMode(FULL_SYNC);
ccfg.setIndexedTypes(Integer.class, String.class);
ccfg.setStatisticsEnabled(true);
ccfg.setQueryDetailMetricsSize(QRY_DETAIL_METRICS_SIZE);
return ccfg;
}
示例2: cacheConfiguration
import org.apache.ignite.configuration.CacheConfiguration; //导入方法依赖的package包/类
/**
* Create base cache configuration.
*
* @param name cache name.
* @return Cache configuration with basic properties set.
*/
private static CacheConfiguration cacheConfiguration(String name) {
CacheConfiguration ccfg = new CacheConfiguration<>(name);
ccfg.setAffinity(new RendezvousAffinityFunction(false, 32));
ccfg.setQueryDetailMetricsSize(10);
ccfg.setStatisticsEnabled(true);
ccfg.setSqlFunctionClasses(SQLFunctions.class);
ccfg.setDataRegionName("demo");
return ccfg;
}
示例3: cacheRandom
import org.apache.ignite.configuration.CacheConfiguration; //导入方法依赖的package包/类
/**
* Configure cacheCountry.
*/
private static <K, V> CacheConfiguration<K, V> cacheRandom() {
CacheConfiguration<K, V> ccfg = new CacheConfiguration<>(RANDOM_CACHE_NAME);
ccfg.setAffinity(new RendezvousAffinityFunction(false, 32));
ccfg.setQueryDetailMetricsSize(10);
ccfg.setStatisticsEnabled(true);
ccfg.setIndexedTypes(Integer.class, Integer.class);
return ccfg;
}