Java Code Examples for org.apache.ignite.configuration.CacheConfiguration#setQueryDetailMetricsSize()

The following examples show how to use org.apache.ignite.configuration.CacheConfiguration#setQueryDetailMetricsSize() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CacheAbstractQueryDetailMetricsSelfTest.java    From ignite with Apache License 2.0 5 votes vote down vote up
/**
 * @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;
}
 
Example 2
Source File: DemoCachesLoadService.java    From ignite with Apache License 2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example 3
Source File: DemoRandomCacheLoadService.java    From ignite with Apache License 2.0 5 votes vote down vote up
/**
 * 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;
}