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

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

Best Java code snippets using org.gridgain.grid.util.typedef.F.isEmpty (Showing top 20 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

/**
 * Default constructor.
 *
 * @param name - Name of cache data structure.
 */
public GridCacheInternalKeyImpl(String name) {
  assert !F.isEmpty(name);
  this.name = name;
}
origin: org.gridgain/gridgain-core

/**
 * Constructs random event router with optional set of filters to apply to streamer projection.
 *
 * @param predicates Node predicates.
 */
@SuppressWarnings("unchecked")
public GridStreamerRandomEventRouter(Collection<GridPredicate<GridNode>> predicates) {
  if (!F.isEmpty(predicates)) {
    this.predicates = new GridPredicate[predicates.size()];
    predicates.toArray(this.predicates);
  }
}
origin: org.gridgain/gridgain-core

/**
 * Gets simple class name taking care of empty names.
 *
 * @param cls Class to get the name for.
 * @return Simple class name.
 */
public static String getSimpleName(Class<?> cls) {
  String name = cls.getSimpleName();
  if (F.isEmpty(name))
    name = cls.getName().substring(cls.getPackage().getName().length() + 1);
  return name;
}
origin: org.gridgain/gridgain-core

/** {@inheritDoc} */
@Override public final void removeMetrics(Collection<UUID> nodeIds) throws GridSpiException {
  assert !F.isEmpty(nodeIds);
  for (UUID id : nodeIds) {
    metricsMap.remove(id);
    tsMap.remove(id);
  }
  removeMetrics0(nodeIds);
}
origin: org.gridgain/gridgain-core

/** {@inheritDoc} */
@Override public boolean addAll(@Nullable Collection<? extends E> c) {
  boolean res = false;
  if (!F.isEmpty(c)) {
    assert c != null;
    for (E e : c) {
      res |= add(e);
    }
  }
  return res;
}
origin: org.gridgain/gridgain-core

/** {@inheritDoc} */
@Override public boolean removeAll(@Nullable Collection<?> c) {
  boolean res = false;
  if (!F.isEmpty(c)) {
    assert c != null;
    for (Object o : c) {
      res |= remove(o);
    }
  }
  return res;
}
origin: org.gridgain/gridgain-core

/**
 * Logs warning if needed.
 *
 * @param log Logger.
 * @param e Error (optional).
 * @param longMsg Long message (or just message).
 * @param shortMsg Short message for quite logging.
 */
public static void warn(@Nullable GridLogger log, @Nullable Throwable e, String longMsg, @Nullable String shortMsg) {
  assert !F.isEmpty(longMsg);
  log(log, e, longMsg, shortMsg, LogLevel.WARN);
}
origin: org.gridgain/gridgain-core

/**
 * @param arr Sorted array to search in.
 * @param val Value.
 * @return {@code True} if value has been found.
 */
private boolean binarySearch(@Nullable int[] arr, int val) {
  if (F.isEmpty(arr))
    return false;
  // If length is relatively small, full iteration is faster.
  return arr.length <= 128 ? F.contains(arr, val) : Arrays.binarySearch(arr, val) >= 0;
}
origin: org.gridgain/gridgain-core

/**
 * Synchronously waits for all futures in the collection.
 *
 * @param futs Futures to wait for.
 * @throws GridException If any of the futures threw exception.
 */
public static void waitAll(@Nullable Iterable<GridFuture<?>> futs) throws GridException {
  if (F.isEmpty(futs))
    return;
  for (GridFuture fut : futs)
    fut.get();
}
origin: org.gridgain/gridgain-core

/**
 * Adds owned versions to map.
 *
 * @param vers Map of owned versions.
 */
public void ownedVersions(Map<K, GridCacheVersion> vers) {
  if (F.isEmpty(vers))
    return;
  if (owned == null)
    owned = new GridLeanMap<>(vers.size());
  owned.putAll(vers);
}
origin: org.gridgain/gridgain-core

/** {@inheritDoc} */
@Override public boolean removeAll(@Nullable Collection<?> c) {
  boolean res = false;
  if (!F.isEmpty(c)) {
    assert c != null;
    for (Object o : c) {
      res |= remove(o);
    }
  }
  return res;
}
origin: org.gridgain/gridgain-core

/** {@inheritDoc} */
@Override public void prepareMarshal(GridCacheContext<K, V> ctx) throws GridException {
  super.prepareMarshal(ctx);
  if (F.isEmpty(keyBytes) && !F.isEmpty(keys))
    keyBytes = marshalCollection(keys, ctx);
}
origin: org.gridgain/gridgain-core

/** {@inheritDoc} */
@Override public Set<GridCacheFlag> flags() {
  GridCacheFlag[] forced = cctx.forcedFlags();
  if (F.isEmpty(forced))
    return flags;
  // We don't expect too many flags, so default size is fine.
  Set<GridCacheFlag> ret = new HashSet<>();
  ret.addAll(flags);
  ret.addAll(F.asList(forced));
  return Collections.unmodifiableSet(ret);
}
origin: org.gridgain/gridgain-core

/** {@inheritDoc} */
@Override public Map<Integer, GridNode> mapPartitionsToNodes(Collection<Integer> parts) {
  A.notNull(parts, "parts");
  Map<Integer, GridNode> map = new HashMap<>();
  if (!F.isEmpty(parts)) {
    for (int p : parts)
      map.put(p, mapPartitionToNode(p));
  }
  return map;
}
origin: org.gridgain/gridgain-core

  /** {@inheritDoc} */
  @Override public boolean apply(GridNode n) {
    if (!U.hasStreamer(n, streamerName))
       return false;
    if (!F.isEmpty(streamerNames))
      for (String sn : streamerNames)
        if (!U.hasStreamer(n, sn))
          return false;
    return true;
  }
}
origin: org.gridgain/gridgain-core

/** {@inheritDoc} */
@Override public GridFuture<?> transformAllAsync(@Nullable Map<? extends K, ? extends GridClosure<V, V>> m) {
  if (F.isEmpty(m))
    return new GridFinishedFuture<Object>(ctx.kernalContext());
  return updateAllAsync0(null, m, null, null, false, false, null, 0, null);
}
origin: org.gridgain/gridgain-core

/** {@inheritDoc} */
@Override public Collection<String> getLifecycleBeansFormatted() {
  GridLifecycleBean[] beans = cfg.getLifecycleBeans();
  return F.isEmpty(beans) ? Collections.<String>emptyList() : F.transform(beans, F.<GridLifecycleBean>string());
}
origin: org.gridgain/gridgain-core

/** {@inheritDoc} */
@Override public void addAttributes(Map<String, Object> attrs) throws GridException {
  super.addAttributes(attrs);
  GridStreamerConfiguration[] cfg = ctx.config().getStreamerConfiguration();
  if (F.isEmpty(cfg))
    return;
  GridStreamerAttributes[] arr = new GridStreamerAttributes[cfg.length];
  int i = 0;
  for (GridStreamerConfiguration c : cfg)
    arr[i++] = new GridStreamerAttributes(c);
  attrs.put(ATTR_STREAMER, arr);
}
origin: org.gridgain/gridgain-core

/**
 * @return Queue size.
 */
public int size() {
  int rmvSize = F.isEmpty(removedIndexes()) ? 0 : removedIndexes().size();
  int size = (int)(tail() - head() - rmvSize);
  assert size >= 0 : size;
  return size;
}
origin: org.gridgain/gridgain-core

/** {@inheritDoc} */
@Override public void start() throws GridException {
  if (ctx.isDaemon())
    return;
  GridConfiguration cfg = ctx.config();
  GridDeploymentMode depMode = cfg.getDeploymentMode();
  if (cfg.isPeerClassLoadingEnabled() && (depMode == PRIVATE || depMode == ISOLATED) &&
    !F.isEmpty(cfg.getServiceConfiguration()))
    throw new GridException("Cannot deploy services in PRIVATE or ISOLATED deployment mode: " + depMode);
}
org.gridgain.grid.util.typedefFisEmpty

Popular methods of F

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getExternalFilesDir (Context)
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
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