本文整理了Java中org.apache.ignite.internal.util.typedef.F.view()
方法的一些代码示例,展示了F.view()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。F.view()
方法的具体详情如下:
包路径:org.apache.ignite.internal.util.typedef.F
类名称:F
方法名:view
暂无
代码示例来源:origin: apache/ignite
/**
* Gets all alive remote nodes that have at least one cache configured.
*
* @return Collection of nodes.
*/
public Collection<ClusterNode> remoteAliveNodesWithCaches() {
return F.view(rmtNodesWithCaches, aliveNodePred);
}
代码示例来源:origin: apache/ignite
/**
* @return Reads.
*/
public Collection<IgniteTxEntry> reads() {
return F.view(entries, CU.READ_FILTER);
}
代码示例来源:origin: apache/ignite
/**
* @return Writes.
*/
public Collection<IgniteTxEntry> writes() {
return F.view(entries, CU.WRITE_FILTER);
}
代码示例来源:origin: apache/ignite
/** {@inheritDoc} */
@Override public Map<String, Object> attributes() {
// Even though discovery SPI removes this attribute after authentication, keep this check for safety.
return F.view(attrs, new IgnitePredicate<String>() {
@Override public boolean apply(String s) {
return !IgniteNodeAttributes.ATTR_SECURITY_CREDENTIALS.equals(s);
}
});
}
代码示例来源:origin: apache/ignite
/**
* @return Near cache entries.
*/
@Nullable public Collection<IgniteTxEntry> nearCacheEntries() {
assert nearEntries > 0;
return F.view(entries, CU.FILTER_NEAR_CACHE_ENTRY);
}
代码示例来源:origin: apache/ignite
/** {@inheritDoc} */
@Override public Map<String, Object> attributes() {
// Even though discovery SPI removes this attribute after authentication, keep this check for safety.
return F.view(attrs, new SecurityCredentialsAttrFilterPredicate());
}
代码示例来源:origin: apache/ignite
/**
* Gets collection of server nodes with at least one cache configured.
*
* @return Collection of nodes.
*/
public Collection<ClusterNode> aliveServerNodes() {
return F.view(serverNodes(), aliveNodePred);
}
代码示例来源:origin: apache/ignite
/**
* @param node Node to remove.
*/
public void removeMappedNode(ClusterNode node) {
if (mappedDhtNodes.contains(node))
mappedDhtNodes = new ArrayList<>(F.view(mappedDhtNodes, F.notEqualTo(node)));
if (mappedNearNodes != null && mappedNearNodes.contains(node))
mappedNearNodes = new ArrayList<>(F.view(mappedNearNodes, F.notEqualTo(node)));
}
代码示例来源:origin: apache/ignite
/**
* @return Near cache reads.
*/
public Collection<IgniteTxEntry> nearEntriesReads() {
assert hasNearCacheEntries();
return F.view(entries, CU.READ_FILTER_NEAR);
}
代码示例来源:origin: apache/ignite
/**
* @return Near cache writes.
*/
public Collection<IgniteTxEntry> nearEntriesWrites() {
assert hasNearCacheEntries();
return F.view(entries, CU.WRITE_FILTER_NEAR);
}
代码示例来源:origin: apache/ignite
/**
* @return Colocated cache reads.
*/
public Collection<IgniteTxEntry> colocatedEntriesReads() {
assert hasColocatedCacheEntries();
return F.view(entries, CU.READ_FILTER_COLOCATED);
}
代码示例来源:origin: apache/ignite
/**
* @return Entries.
*/
public Collection<GridDhtCacheEntry> entries() {
return F.view(entries, F.notNull());
}
代码示例来源:origin: apache/ignite
/**
* @return Colocated cache writes.
*/
public Collection<IgniteTxEntry> colocatedEntriesWrites() {
assert hasColocatedCacheEntries();
return F.view(entries, CU.WRITE_FILTER_COLOCATED);
}
代码示例来源:origin: apache/ignite
/**
* @param nodes Nodes.
* @return Backup nodes.
*/
public static Collection<ClusterNode> backups(Collection<ClusterNode> nodes) {
if (nodes == null || nodes.size() <= 1)
return Collections.emptyList();
return F.view(nodes, F.notEqualTo(F.first(nodes)));
}
代码示例来源:origin: apache/ignite
/**
* @param part Partition.
* @param topVer Topology version.
* @return Backup nodes.
*/
private Collection<ClusterNode> backupsByPartition(int part, AffinityTopologyVersion topVer) {
List<ClusterNode> nodes = nodesByPartition(part, topVer);
assert !F.isEmpty(nodes);
if (nodes.size() == 1)
return Collections.emptyList();
return F.view(nodes, F.notEqualTo(nodes.get(0)));
}
代码示例来源:origin: apache/ignite
/**
* Gets server nodes topology by specified version from snapshots history storage.
*
* @param topVer Topology version.
* @return Server topology nodes.
*/
public Collection<ClusterNode> serverTopologyNodes(long topVer) {
return F.view(topology(topVer), F.not(FILTER_CLI), FILTER_NOT_DAEMON);
}
代码示例来源:origin: apache/ignite
/**
* @param proc Continuous processor.
* @return Local event routines.
*/
private Collection<LocalRoutineInfo> localRoutines(GridContinuousProcessor proc) {
return F.view(U.<Map<UUID, LocalRoutineInfo>>field(proc, "locInfos").values(),
new IgnitePredicate<LocalRoutineInfo>() {
@Override public boolean apply(LocalRoutineInfo info) {
return info.handler().isEvents();
}
});
}
代码示例来源:origin: apache/ignite
@Override public Collection<ClusterNode> remoteDaemonNodes() {
final Collection<ClusterNode> all = ctx.discovery().daemonNodes();
return !localNode().isDaemon() ?
all :
F.view(all, new IgnitePredicate<ClusterNode>() {
@Override public boolean apply(ClusterNode n) {
return n.isDaemon();
}
});
}
代码示例来源:origin: apache/ignite
/**
* @param g Grid.
* @return Non-system caches.
*/
private Collection<CacheConfiguration> caches(Ignite g) {
return F.view(Arrays.asList(g.configuration().getCacheConfiguration()), new IgnitePredicate<CacheConfiguration>() {
@Override public boolean apply(CacheConfiguration c) {
return !CU.UTILITY_CACHE_NAME.equals(c.getName()) && !CU.SYS_CACHE_HADOOP_MR.equals(c.getName());
}
});
}
}
代码示例来源:origin: apache/ignite
/** {@inheritDoc} */
@Override public Collection<ClusterNode> affinityNodes() {
info("Near node ID: " + grid(nearIdx).localNode().id());
return F.view(super.affinityNodes(), new P1<ClusterNode>() {
@Override public boolean apply(ClusterNode n) {
return !F.eq(grid(n).name(), grid(nearIdx).name());
}
});
}
内容来源于网络,如有侵权,请联系作者删除!