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

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

Best Java code snippets using org.apache.ignite.internal.processors.cache.IgniteInternalCache.getAndPutAsync (Showing top 9 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

  /** {@inheritDoc} */
  @Override public IgniteInternalFuture<?> applyx(IgniteInternalCache<Object, Object> c, GridKernalContext ctx) {
    return c.getAndPutAsync(key, val);
  }
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public IgniteInternalFuture getAndPutAsync(Object key, Object val) {
  return delegate.get().getAndPutAsync(keyTransformer.transform(key), val);
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public IgniteInternalFuture<V> getAndPutAsync(K key, V val) {
  CacheOperationContext prev = gate.enter(opCtx);
  try {
    return delegate.getAndPutAsync(key, val);
  }
  finally {
    gate.leave(prev);
  }
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public IgniteFuture<V> getAndPutAsync(K key, V val) {
  IgniteInternalCache<K, V> delegate = getDelegateSafe();
  return createFuture(delegate.getAndPutAsync(key, val));
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public V getAndPut(K key, V val) {
  IgniteInternalCache<K, V> delegate = getDelegateSafe();
  try {
    if (isAsync()) {
      setFuture(delegate.getAndPutAsync(key, val));
      return null;
    }
    else
      return delegate.getAndPut(key, val);
  }
  catch (IgniteCheckedException | IgniteException e) {
    throw cacheException(e);
  }
}
origin: org.apache.ignite/ignite-core

  /** {@inheritDoc} */
  @Override public IgniteInternalFuture<?> applyx(IgniteInternalCache<Object, Object> c, GridKernalContext ctx) {
    return c.getAndPutAsync(key, val);
  }
}
origin: org.apache.ignite/ignite-core

/** {@inheritDoc} */
@Override public IgniteFuture<V> getAndPutAsync(K key, V val) {
  return createFuture(delegate.getAndPutAsync(key, val));
}
origin: org.apache.ignite/ignite-core

/** {@inheritDoc} */
@Override public IgniteInternalFuture<V> getAndPutAsync(K key, V val) {
  CacheOperationContext prev = gate.enter(opCtx);
  try {
    return delegate.getAndPutAsync(key, val);
  }
  finally {
    gate.leave(prev);
  }
}
origin: org.apache.ignite/ignite-core

/** {@inheritDoc} */
@Override public V getAndPut(K key, V val) {
  try {
    if (isAsync()) {
      setFuture(delegate.getAndPutAsync(key, val));
      return null;
    }
    else
      return delegate.getAndPut(key, val);
  }
  catch (IgniteCheckedException | IgniteException e) {
    throw cacheException(e);
  }
}
org.apache.ignite.internal.processors.cacheIgniteInternalCachegetAndPutAsync

Javadoc

Asynchronously stores given key-value pair in cache. If filters are provided, then entries will be stored in cache only if they pass the filter. Note that filter check is atomic, so value stored in cache is guaranteed to be consistent with the filters. If cache previously contained value for the given key, then this value is returned. Otherwise, in case of CacheMode#REPLICATED caches, the value will be loaded from swap and, if it's not there, and read-through is allowed, from the underlying CacheStore storage. In case of CacheMode#PARTITIONED caches, the value will be loaded from the primary node, which in its turn may load the value from the swap storage, and consecutively, if it's not in swap and read-through is allowed, from the underlying persistent storage. If value has to be loaded from persistent storage, CacheStore#load(Transaction, Object) method will be used.

If the returned value is not needed, method #putx(Object, Object, org.apache.ignite.lang.IgnitePredicate[]) should always be used instead of this one to avoid the overhead associated with returning of the previous value.

If write-through is enabled, the stored value will be persisted to CacheStorevia CacheStore#put(Transaction, Object, Object) method.

Transactions This method is transactional and will enlist the entry into ongoing transaction if there is one.

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,
  • clear,
  • clearLocallyAll,
  • isEmpty,
  • isIgfsDataCache,
  • keySet,
  • localEntries,
  • localPeek,
  • lock

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • findViewById (Activity)
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • ImageIO (javax.imageio)
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