org.apache.ignite.internal.util.typedef.F.notEqualTo()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(89)

本文整理了Java中org.apache.ignite.internal.util.typedef.F.notEqualTo()方法的一些代码示例,展示了F.notEqualTo()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。F.notEqualTo()方法的具体详情如下:
包路径:org.apache.ignite.internal.util.typedef.F
类名称:F
方法名:notEqualTo

F.notEqualTo介绍

暂无

代码示例

代码示例来源: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

/**
 * @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

/**
 * @throws Exception If failed.
 */
@Test
public void testCallAsyncErrorNoFailover() throws Exception {
  IgniteCompute comp = compute(grid(0).cluster().forPredicate(F.notEqualTo(grid(0).localNode())));
  IgniteFuture<Integer> fut = comp.withNoFailover().callAsync(new ClosureTestCallableError());
  try {
    fut.get();
    assert false : "Exception should have been thrown.";
  }
  catch (IgniteException e) {
    info("Caught expected exception: " + e);
  }
}

代码示例来源:origin: org.apache.ignite/ignite-core

/**
 * @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: org.apache.ignite/ignite-core

/**
 * @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: org.apache.ignite/ignite-core

/**
 * @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)));
}

相关文章