Codota Logo
IgniteInternalCache.clear
Code IndexAdd Codota to your IDE (free)

How to use
clear
method
in
org.apache.ignite.internal.processors.cache.IgniteInternalCache

Best Java code snippets using org.apache.ignite.internal.processors.cache.IgniteInternalCache.clear (Showing top 14 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: apache/ignite

/**
 * Called to remove all data from cache without regard to transaction.
 *
 * @param cache Cache.
 * @throws IgniteCheckedException If failed.
 */
public static void evictAll(IgniteInternalCache<Object, Object> cache) throws IgniteCheckedException {
  cache.clear();
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public void clear(K key) {
  IgniteInternalCache<K, V> delegate = getDelegateSafe();
  try {
    if (isAsync())
      setFuture(delegate.clearAsync(key));
    else
      delegate.clear(key);
  }
  catch (IgniteCheckedException | IgniteException e) {
    throw cacheException(e);
  }
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public void clear() {
  IgniteInternalCache<K, V> delegate = getDelegateSafe();
  try {
    if (isAsync())
      setFuture(delegate.clearAsync());
    else
      delegate.clear();
  }
  catch (IgniteCheckedException | IgniteException e) {
    throw cacheException(e);
  }
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public void clear() throws IgniteCheckedException {
  delegate.get().clear();
}
origin: org.apache.ignite/ignite-core

/** {@inheritDoc} */
@Override public void clear() {
  try {
    if (isAsync())
      setFuture(delegate.clearAsync());
    else
      delegate.clear();
  }
  catch (IgniteCheckedException | IgniteException e) {
    throw cacheException(e);
  }
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public void clear(Object key) throws IgniteCheckedException {
  delegate.get().clear(keyTransformer.transform(key));
}
origin: org.apache.ignite/ignite-core

/** {@inheritDoc} */
@Override public void clear(K key) {
  try {
    if (isAsync())
      setFuture(delegate.clearAsync(key));
    else
      delegate.clear(key);
  }
  catch (IgniteCheckedException | IgniteException e) {
    throw cacheException(e);
  }
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public void clear() throws IgniteCheckedException {
  CacheOperationContext prev = gate.enter(opCtx);
  try {
    delegate.clear();
  }
  finally {
    gate.leave(prev);
  }
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public void clear(K key) throws IgniteCheckedException {
  CacheOperationContext prev = gate.enter(opCtx);
  try {
    delegate.clear(key);
  }
  finally {
    gate.leave(prev);
  }
}
origin: apache/ignite

/**
 * Success if implicit tx fails.
 *
 * @param cache Cache instance.
 * @throws Exception If failed.
 */
protected void checkImplicitTxSuccess(final IgniteInternalCache<Object, Object> cache) throws Exception {
  cache.invoke("key", new EntryProcessor<Object, Object, Object>() {
    @Override public Object process(final MutableEntry<Object, Object> entry, final Object... args)
      throws EntryProcessorException {
      try {
        sleepForTxFailure();
      } catch (InterruptedException e) {
        throw new EntryProcessorException(e);
      }
      return null;
    }
  });
  cache.clear();
}
origin: apache/ignite

/**
 * Success if explicit tx doesn't fail.
 *
 * @param cache Cache instance.
 * @throws Exception If failed.
 */
protected void checkStartTxSuccess(final IgniteInternalCache<Object, Object> cache) throws Exception {
  try (final GridNearTxLocal tx = CU.txStartInternal(cache.context(), cache, PESSIMISTIC, REPEATABLE_READ)) {
    assert tx != null;
    sleepForTxFailure();
    cache.put("key", "val");
    tx.commit();
  }
  assert cache.containsKey("key");
  cache.clear();
}
origin: apache/ignite

/** {@inheritDoc} */
@Override protected void afterTest() throws Exception {
  for (int i = 0; i < NODES_CNT; i++) {
    grid(i).cachex(grid(i).igfsx("igfs").configuration().getMetaCacheConfiguration().getName()).clear();
    grid(i).cachex(grid(i).igfsx("igfs").configuration().getDataCacheConfiguration().getName()).clear();
  }
}
origin: org.apache.ignite/ignite-core

/** {@inheritDoc} */
@Override public void clear(K key) throws IgniteCheckedException {
  CacheOperationContext prev = gate.enter(opCtx);
  try {
    delegate.clear(key);
  }
  finally {
    gate.leave(prev);
  }
}
origin: org.apache.ignite/ignite-core

/** {@inheritDoc} */
@Override public void clear() throws IgniteCheckedException {
  CacheOperationContext prev = gate.enter(opCtx);
  try {
    delegate.clear();
  }
  finally {
    gate.leave(prev);
  }
}
org.apache.ignite.internal.processors.cacheIgniteInternalCacheclear

Javadoc

Clears cache on all nodes that store it's data. That is, caches are cleared on remote nodes and local node, as opposed to IgniteInternalCache#clearLocally(boolean,boolean,boolean) method which only clears local node's cache.

Ignite will make the best attempt to clear caches on all nodes. If some caches could not be cleared, then exception will be thrown.

Popular methods of IgniteInternalCache

  • context
  • get
    Retrieves value mapped to the specified key from cache. Value will only be returned if its entry pas
  • affinity
    Gets affinity service to provide information about data partitioning and distribution.
  • configuration
    Gets configuration bean for this cache.
  • containsKey
  • getAndPut
    Stores given key-value pair in cache. If filters are provided, then entries will be stored in cache
  • getAndPutIfAbsent
    Stores given key-value pair in cache only if cache had no previous mapping for it. If cache previous
  • invoke
  • invokeAsync
  • put
    Stores given key-value pair in cache. If filters are provided, then entries will be stored in cache
  • size
  • cache
    Gets base cache for this projection.
  • size,
  • cache,
  • clearLocallyAll,
  • isEmpty,
  • isIgfsDataCache,
  • keySet,
  • localEntries,
  • localPeek,
  • lock

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • getSystemService (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
  • JComboBox (javax.swing)
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