Tabnine Logo
F.identity
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.gridgain/gridgain-spring

/**
 * @param log Logger.
 * @param name Cache name.
 * @param cache Cache.
 * @param keyFactory Key factory.
 */
GridSpringCache(GridLogger log, String name, GridCacheProjection<?, ?> cache,
  GridClosure<Object, Object> keyFactory) {
  assert cache != null;
  this.log = log;
  this.name = name;
  this.cache = (GridCacheProjection<Object, Object>)cache;
  this.keyFactory = keyFactory != null ? keyFactory : F.identity();
}
origin: org.gridgain/gridgain-core

  /**
   * Returns only directly available nodes from given collection.
   *
   * @param nodes Nodes.
   * @return Directly available subset.
   */
  protected static Collection<GridClientNode> selectDirectNodes(Collection<? extends GridClientNode> nodes) {
    return F.viewReadOnly(nodes, F.<GridClientNode>identity(), CONNECTABLE);
  }
}
origin: org.gridgain/gridgain-core

/** {@inheritDoc} */
@Override public Iterator<GridCacheEntry<K, V>> iterator() {
  return new GridCacheIterator<>(set, F.<GridCacheEntry<K, V>>identity(), filter);
}
origin: org.gridgain/gridgain-core

/** {@inheritDoc} */
@Override public GridIterator<GridUuid> iterator() {
  return F.iterator(Collections.singleton(this), F.<GridUuid>identity(), true);
}
origin: org.gridgain/gridgain-core

/**
 * Returns tha list of resolved socket addresses. First addresses are resolved by host names,
 * if this attempt fails then the addresses are resolved by ip addresses.
 *
 * @param addrs Addresses.
 * @param hostNames Host names.
 * @param port Port.
 * @return Socket addresses for given addresses and host names.
 */
public static Collection<InetSocketAddress> toSocketAddresses(Collection<String> addrs,
  Collection<String> hostNames, int port) {
  List<InetSocketAddress> res = new ArrayList<>(addrs.size());
  Iterator<String> hostNamesIt = hostNames.iterator();
  for (String addr : addrs) {
    String hostName = hostNamesIt.hasNext() ? hostNamesIt.next() : null;
    if (!F.isEmpty(hostName)) {
      InetSocketAddress inetSockAddr = new InetSocketAddress(hostName, port);
      if (inetSockAddr.isUnresolved() || inetSockAddr.getAddress().isLoopbackAddress())
        inetSockAddr = new InetSocketAddress(addr, port);
      res.add(inetSockAddr);
    }
    // Always append address because local and remote nodes may have the same hostname
    // therefore remote hostname will be always resolved to local address.
    res.add(new InetSocketAddress(addr, port));
  }
  return F.viewListReadOnly(res, F.<InetSocketAddress>identity());
}
origin: org.gridgain/gridgain-core

    ", hostNames=" + hostNames + ']');
return F.viewListReadOnly(res, F.<InetAddress>identity());
origin: org.gridgain/gridgain-core

Collection<GridNode> top = F.viewReadOnly(rmts, F.<GridNode>identity(),
  F.and(F.notIn(processed), VISIBLE_NODES));
org.gridgain.grid.util.typedefFidentity

Popular methods of F

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

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JLabel (javax.swing)
  • JTable (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now