当前位置: 首页>>代码示例>>Java>>正文


Java IgniteCache.getName方法代码示例

本文整理汇总了Java中org.apache.ignite.IgniteCache.getName方法的典型用法代码示例。如果您正苦于以下问题:Java IgniteCache.getName方法的具体用法?Java IgniteCache.getName怎么用?Java IgniteCache.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.ignite.IgniteCache的用法示例。


在下文中一共展示了IgniteCache.getName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: CacheColumnDecisionTreeTrainerInput

import org.apache.ignite.IgniteCache; //导入方法依赖的package包/类
/**
 * Constructs input for {@link ColumnDecisionTreeTrainer}.
 *
 * @param c Cache.
 * @param valuesMapper Function for mapping cache entry to stream used by {@link ColumnDecisionTreeTrainer}.
 * @param labelsMapper Function used for mapping cache value to labels array.
 * @param keyMapper Function used for mapping feature index to the cache key.
 * @param catFeaturesInfo Information about which features are categorical in form of feature index -> number of
 * categories.
 * @param featuresCnt Count of features.
 * @param samplesCnt Count of samples.
 */
// TODO: IGNITE-5724 think about boxing/unboxing
public CacheColumnDecisionTreeTrainerInput(IgniteCache<K, V> c,
    IgniteSupplier<Stream<K>> labelsKeys,
    IgniteFunction<Cache.Entry<K, V>, Stream<IgniteBiTuple<Integer, Double>>> valuesMapper,
    IgniteFunction<V, DoubleStream> labelsMapper,
    IgniteFunction<Integer, Stream<K>> keyMapper,
    Map<Integer, Integer> catFeaturesInfo,
    int featuresCnt, int samplesCnt) {

    cacheName = c.getName();
    this.labelsKeys = labelsKeys;
    this.valuesMapper = valuesMapper;
    this.labelsMapper = labelsMapper;
    this.keyMapper = keyMapper;
    this.catFeaturesInfo = catFeaturesInfo;
    this.samplesCnt = samplesCnt;
    this.featuresCnt = featuresCnt;
}
 
开发者ID:Luodian,项目名称:Higher-Cloud-Computing-Project,代码行数:31,代码来源:CacheColumnDecisionTreeTrainerInput.java

示例2: updateCache

import org.apache.ignite.IgniteCache; //导入方法依赖的package包/类
/**
 * Add a cache update to this object.
 *
 * @param cache Cache to be updated.
 * @param key Key of cache to be updated.
 * @param val New value.
 * @param <K> Type of key of cache to be updated.
 * @param <V> New value.
 * @return This object.
 */
@SuppressWarnings("unchecked")
public <K, V> ResultAndUpdates<R> updateCache(IgniteCache<K, V> cache, K key, V val) {
    String name = cache.getName();

    updates.computeIfAbsent(name, s -> new ConcurrentHashMap());
    updates.get(name).put(key, val);

    return this;
}
 
开发者ID:Luodian,项目名称:Higher-Cloud-Computing-Project,代码行数:20,代码来源:ResultAndUpdates.java


注:本文中的org.apache.ignite.IgniteCache.getName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。