congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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

  • Making http requests using okhttp
  • findViewById (Activity)
  • setRequestProperty (URLConnection)
  • startActivity (Activity)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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