本文整理汇总了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;
}