Codota Logo
F.node2id
Code IndexAdd Codota to your IDE (free)

How to use
node2id
method
in
org.gridgain.grid.util.typedef.F

Best Java code snippets using org.gridgain.grid.util.typedef.F.node2id (Showing top 13 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: org.gridgain/gridgain-core

/**
 * Converts collection of nodes to collection of node IDs.
 *
 * @param nodes Nodes.
 * @return Node IDs.
 */
public static Collection<UUID> nodeIds(@Nullable Collection<? extends GridNode> nodes) {
  return F.viewReadOnly(nodes, F.node2id());
}
origin: org.gridgain/gridgain-core

/**
 * @param nodeId Node ID.
 * @return {@code True} if node is in the ring and is not being removed from.
 */
private boolean nodeAlive(UUID nodeId) {
  // Is node alive or about to be removed from the ring?
  GridTcpDiscoveryNode node = ring.node(nodeId);
  boolean nodeAlive = node != null && node.visible();
  if (nodeAlive) {
    synchronized (mux) {
      nodeAlive = !F.transform(failedNodes, F.node2id()).contains(nodeId) &&
        !F.transform(leavingNodes, F.node2id()).contains(nodeId);
    }
  }
  return nodeAlive;
}
origin: org.gridgain/gridgain-core

/** {@inheritDoc} */
@Override public Collection<GridNode> nodes(int p, long topVer) {
  Collection<GridNode> affNodes = cctx.affinity().nodes(p, topVer);
  lock.readLock().lock();
  try {
    assert node2part != null && node2part.valid() : "Invalid node-to-partitions map [topVer=" + topVer +
      ", node2part=" + node2part + ']';
    Collection<GridNode> nodes = null;
    Collection<UUID> nodeIds = part2node.get(p);
    if (!F.isEmpty(nodeIds)) {
      Collection<UUID> affIds = new HashSet<>(F.viewReadOnly(affNodes, F.node2id()));
      for (UUID nodeId : nodeIds) {
        if (!affIds.contains(nodeId) && hasState(p, nodeId, OWNING, MOVING, RENTING)) {
          GridNode n = cctx.discovery().node(nodeId);
          if (n != null && (topVer < 0 || n.order() <= topVer)) {
            if (nodes == null) {
              nodes = new ArrayList<>(affNodes.size() + 2);
              nodes.addAll(affNodes);
            }
            nodes.add(n);
          }
        }
      }
    }
    return nodes != null ? nodes : affNodes;
  }
  finally {
    lock.readLock().unlock();
  }
}
origin: org.gridgain/gridgain-core

/**
 * @param nodes Nodes.
 * @param id ID.
 * @param partMap Partition map.
 * @throws GridException If failed.
 */
private void sendAllPartitions(Collection<? extends GridNode> nodes, GridDhtPartitionExchangeId id,
  GridDhtPartitionFullMap partMap) throws GridException {
  GridDhtPartitionsFullMessage<K, V> m = new GridDhtPartitionsFullMessage<>(id, partMap, lastVer.get(),
    id.topologyVersion());
  if (log.isDebugEnabled())
    log.debug("Sending full partition map [nodeIds=" + F.viewReadOnly(nodes, F.node2id()) +
      ", exchId=" + exchId + ", msg=" + m + ']');
  cctx.io().safeSend(nodes, m, null);
}
origin: org.gridgain/gridgain-core

  /**
   * Cleans metrics store.
   */
  private void cleanMetricsStore() {
    assert metricsStore != null;
    try {
      Collection<UUID> ids = F.view(metricsStore.allNodeIds(), F.notContains(
        F.viewReadOnly(ring.allNodes(), F.node2id())));
      if (!ids.isEmpty())
        metricsStore.removeMetrics(ids);
    }
    catch (GridSpiException e) {
      LT.error(log, e, "Failed to clean metrics store up.");
    }
  }
}
origin: org.gridgain/gridgain-core

waitForStopAck.put(routineId, new GridConcurrentHashSet<>(F.viewReadOnly(nodes, F.node2id())));
origin: org.gridgain/gridgain-ggfs

F.viewReadOnly(
  ggfsCtx.kernalContext().discovery().allNodes(),
  F.node2id(),
  new P1<GridNode>() {
    @Override public boolean apply(GridNode n) {
origin: org.gridgain/gridgain-core

F.viewReadOnly(
  ggfsCtx.kernalContext().discovery().allNodes(),
  F.node2id(),
  new P1<GridNode>() {
    @Override public boolean apply(GridNode n) {
origin: org.gridgain/gridgain-core

nodeIds = new GridConcurrentHashSet<>(F.viewReadOnly(nodes, F.node2id()));
origin: org.gridgain/gridgain-ggfs

if (last != null && equal(last.nodeIds(), F.viewReadOnly(affNodes, F.node2id()))) {
origin: org.gridgain/gridgain-core

if (last != null && equal(last.nodeIds(), F.viewReadOnly(affNodes, F.node2id()))) {
origin: org.gridgain/gridgain-core

    ", affNodes=" + F.nodeIds(affNodes) + ']');
if (last != null && equal(last.nodeIds(), F.viewReadOnly(affNodes, F.node2id()))) {
origin: org.gridgain/gridgain-ggfs

    ", affNodes=" + F.nodeIds(affNodes) + ']');
if (last != null && equal(last.nodeIds(), F.viewReadOnly(affNodes, F.node2id()))) {
org.gridgain.grid.util.typedefFnode2id

Popular methods of F

  • eq
  • isEmpty
  • t
  • viewReadOnly
  • addIfAbsent
  • asList
  • concat
  • first
  • firstEntry
  • forEach
  • identity
  • nodeIds
  • identity,
  • nodeIds,
  • sumInt,
  • transform,
  • view,
  • alwaysFalse,
  • alwaysTrue,
  • and,
  • asArray

Popular in Java

  • Creating JSON documents from java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • runOnUiThread (Activity)
  • getSharedPreferences (Context)
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now