Codota Logo
RetryTemplate.setRetryContextCache
Code IndexAdd Codota to your IDE (free)

How to use
setRetryContextCache
method
in
org.springframework.retry.support.RetryTemplate

Best Java code snippets using org.springframework.retry.support.RetryTemplate.setRetryContextCache (Showing top 10 results out of 315)

  • Common ways to obtain RetryTemplate
private void myMethod () {
RetryTemplate r =
  • Codota Iconnew RetryTemplate()
  • Codota IconDefaultRetryPolicyFactory.makeRabbitTemplateRetry()
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-batch

public void setRetryContextCache(RetryContextCache retryContextCache) {
  delegate.setRetryContextCache(retryContextCache);
  regular.setRetryContextCache(retryContextCache);
}
origin: spring-projects/spring-retry

private MethodInterceptor getStatefulInterceptor(Object target, Method method, Retryable retryable) {
  RetryTemplate template = createTemplate(retryable.listeners());
  template.setRetryContextCache(this.retryContextCache);
origin: org.springframework.batch/spring-batch-core

public void setRetryContextCache(RetryContextCache retryContextCache) {
  delegate.setRetryContextCache(retryContextCache);
  regular.setRetryContextCache(retryContextCache);
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

public void setRetryContextCache(RetryContextCache retryContextCache) {
  delegate.setRetryContextCache(retryContextCache);
  regular.setRetryContextCache(retryContextCache);
}
origin: apache/servicemix-bundles

public void setRetryContextCache(RetryContextCache retryContextCache) {
  delegate.setRetryContextCache(retryContextCache);
  regular.setRetryContextCache(retryContextCache);
}
origin: spring-projects/spring-amqp

retryTemplate.setRetryContextCache(cache);
fb.setRetryOperations(retryTemplate);
origin: spring-projects/spring-amqp

retryTemplate.setRetryContextCache(cache);
fb.setRetryOperations(retryTemplate);
fb.setMessageRecoverer(new RejectAndDontRequeueRecoverer());
origin: spring-projects/spring-amqp

retryTemplate.setRetryContextCache(cache);
fb.setRetryOperations(retryTemplate);
fb.setMessageRecoverer(new RejectAndDontRequeueRecoverer());
origin: spring-projects/spring-amqp

@Test
public void testStatefulRetryWithNoMessageIds() throws Exception {
  int messageCount = 2;
  int txSize = 1;
  int failFrequency = 1;
  int concurrentConsumers = 1;
  SimpleMessageConverter messageConverter = new SimpleMessageConverter();
  // There will be no key for these messages so they cannot be recovered...
  messageConverter.setCreateMessageIds(false);
  this.messageConverter = messageConverter;
  // Beware of context cache busting if retry policy fails...
  this.retryTemplate = new RetryTemplate();
  this.retryTemplate.setRetryContextCache(new MapRetryContextCache(1));
  // The container should have shutdown, so there are now no active consumers
  exception.expectMessage("expected:<1> but was:<0>");
  doTestStatefulRetry(messageCount, txSize, failFrequency, concurrentConsumers);
}
origin: org.springframework.retry/spring-retry

private MethodInterceptor getStatefulInterceptor(Object target, Method method, Retryable retryable) {
  RetryTemplate template = createTemplate(retryable.listeners());
  template.setRetryContextCache(this.retryContextCache);
org.springframework.retry.supportRetryTemplatesetRetryContextCache

Javadoc

Public setter for the RetryContextCache.

Popular methods of RetryTemplate

  • <init>
  • setRetryPolicy
    Setter for RetryPolicy.
  • setBackOffPolicy
    Setter for BackOffPolicy.
  • execute
    Execute the callback once if the policy dictates that we can, re-throwing any exception encountered
  • registerListener
    Register an additional listener.
  • setListeners
    Setter for listeners. The listeners are executed before and after a retry block (i.e. before and aft
  • canRetry
    Decide whether to proceed with the ongoing retry attempt. This method is called before the RetryCall
  • close
    Clean up the cache if necessary and close the context provided (if the flag indicates that processin
  • handleRetryExhausted
    Actions to take after final attempt has failed. If there is state clean up the cache. If there is a
  • open
    Delegate to the RetryPolicy having checked in the cache for an existing value if the state is not nu
  • registerThrowable
  • setThrowLastExceptionOnExhausted
  • registerThrowable,
  • setThrowLastExceptionOnExhausted,
  • doCloseInterceptors,
  • doExecute,
  • doOnErrorInterceptors,
  • doOpenInterceptors,
  • doOpenInternal,
  • registerContext,
  • rethrow

Popular in Java

  • Reading from database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • runOnUiThread (Activity)
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
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