Tabnine Logo
IgniteInternalCache.invokeAsync
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: apache/ignite

/** {@inheritDoc} */
@Override public IgniteInternalFuture<EntryProcessorResult> invokeAsync(
  Object key,
  EntryProcessor entryProcessor,
  Object... args
) {
  return delegate.get().invokeAsync(keyTransformer.transform(key), entryProcessor, args);
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public <T> IgniteInternalFuture<EntryProcessorResult<T>> invokeAsync(K key,
  EntryProcessor<K, V, T> entryProcessor,
  Object... args) {
  CacheOperationContext prev = gate.enter(opCtx);
  try {
    return delegate.invokeAsync(key, entryProcessor, args);
  }
  finally {
    gate.leave(prev);
  }
}
origin: apache/ignite

/**
 * @param jobId Job id.
 * @param c Closure of operation.
 */
private void transform(HadoopJobId jobId, EntryProcessor<HadoopJobId, HadoopJobMetadata, Void> c) {
  jobMetaCache().invokeAsync(jobId, c).listen(failsLog);
}
origin: apache/ignite

/**
 * Invoke async operation internal implementation.
 *
 * @param key Key.
 * @param entryProcessor Processor.
 * @param args Arguments.
 * @return Internal future.
 */
private <T> IgniteInternalFuture<T> invokeAsync0(K key, EntryProcessor<K, V, T> entryProcessor, Object[] args) {
  IgniteInternalCache<K, V> delegate = getDelegateSafe();
  IgniteInternalFuture<EntryProcessorResult<T>> fut = delegate.invokeAsync(key, entryProcessor, args);
  return fut.chain(new CX1<IgniteInternalFuture<EntryProcessorResult<T>>, T>() {
    @Override public T applyx(IgniteInternalFuture<EntryProcessorResult<T>> fut1)
      throws IgniteCheckedException {
      try {
        return fut1.get().get();
      }
      catch (RuntimeException e) {
        throw new GridClosureException(e);
      }
    }
  });
}
origin: apache/ignite

IgniteInternalCache<HadoopJobId, HadoopJobMetadata> cache = finishedJobMetaCache();
cache.invokeAsync(info.jobId(), new UpdatePhaseProcessor(incrCntrs, PHASE_COMPLETE)).
  listen(failsLog);
origin: apache/ignite

/**
 * @throws Exception If failed.
 */
@Test
public void testInternalInvokeNullable() throws Exception {
  IgniteInternalCache<Integer, Integer> cache = grid(0).cachex(DEFAULT_CACHE_NAME);
  EntryProcessor<Integer, Integer, Void> processor = new NullableProcessor();
  for (final Integer key : keys()) {
    log.info("Test invoke with a nullable result [key=" + key + ']');
    EntryProcessorResult<Void> result = cache.invoke(key, processor);
    EntryProcessorResult<Void> resultAsync = cache.invokeAsync(key, processor).get();
    assertNotNull(result);
    assertNotNull(resultAsync);
    assertNull(result.get());
    assertNull(resultAsync.get());
  }
}
origin: org.apache.ignite/ignite-core

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

/**
 * Invoke async operation internal implementation.
 *
 * @param key Key.
 * @param entryProcessor Processor.
 * @param args Arguments.
 * @return Internal future.
 */
private <T> IgniteInternalFuture<T> invokeAsync0(K key, EntryProcessor<K, V, T> entryProcessor, Object[] args) {
  IgniteInternalFuture<EntryProcessorResult<T>> fut = delegate.invokeAsync(key, entryProcessor, args);
  return fut.chain(new CX1<IgniteInternalFuture<EntryProcessorResult<T>>, T>() {
    @Override public T applyx(IgniteInternalFuture<EntryProcessorResult<T>> fut1)
      throws IgniteCheckedException {
      try {
        return fut1.get().get();
      }
      catch (RuntimeException e) {
        throw new GridClosureException(e);
      }
    }
  });
}
org.apache.ignite.internal.processors.cacheIgniteInternalCacheinvokeAsync

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
  • 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.
  • clear
    Clears key on all nodes that store it's data. That is, caches are cleared on remote nodes and local
  • cache,
  • clear,
  • clearLocallyAll,
  • isEmpty,
  • isIgfsDataCache,
  • keySet,
  • localEntries,
  • localPeek,
  • lock

Popular in Java

  • Updating database using SQL prepared statement
  • setContentView (Activity)
  • getSystemService (Context)
  • startActivity (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Notification (javax.management)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top Sublime Text plugins
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