Tabnine Logo
MethodExecutionAction.execute
Code IndexAdd Tabnine to your IDE (free)

How to use
execute
method
in
com.netflix.hystrix.contrib.javanica.command.MethodExecutionAction

Best Java code snippets using com.netflix.hystrix.contrib.javanica.command.MethodExecutionAction.execute (Showing top 4 results out of 315)

origin: PipelineAI/pipeline

/**
 * Invokes the method. Also private method also can be invoked.
 *
 * @return result of execution
 */
@Override
public Object executeWithArgs(ExecutionType executionType, Object[] args) throws CommandActionExecutionException {
  if(ExecutionType.ASYNCHRONOUS == executionType){
    Closure closure = AsyncClosureFactory.getInstance().createClosure(metaHolder, method, object, args);
    return executeClj(closure.getClosureObj(), closure.getClosureMethod());
  }
  return execute(object, method, args);
}
origin: PipelineAI/pipeline

public HystrixGeneratedCacheKey generateCacheKey(CacheInvocationContext<? extends Annotation> cacheInvocationContext) throws HystrixCacheKeyGenerationException {
  MethodExecutionAction cacheKeyMethod = cacheInvocationContext.getCacheKeyMethod();
  if (cacheKeyMethod != null) {
    try {
      return new DefaultHystrixGeneratedCacheKey((String) cacheKeyMethod.execute(cacheInvocationContext.getExecutionType()));
    } catch (Throwable throwable) {
      throw new HystrixCacheKeyGenerationException(throwable);
    }
  } else {
    if (cacheInvocationContext.hasKeyParameters()) {
      StringBuilder cacheKeyBuilder = new StringBuilder();
      for (CacheInvocationParameter parameter : cacheInvocationContext.getKeyParameters()) {
        CacheKey cacheKey = parameter.getCacheKeyAnnotation();
        if (cacheKey != null && StringUtils.isNotBlank(cacheKey.value())) {
          appendPropertyValue(cacheKeyBuilder, Arrays.asList(StringUtils.split(cacheKey.value(), ".")), parameter.getValue());
        } else {
          cacheKeyBuilder.append(parameter.getValue());
        }
      }
      return new DefaultHystrixGeneratedCacheKey(cacheKeyBuilder.toString());
    } else {
      return DefaultHystrixGeneratedCacheKey.EMPTY;
    }
  }
}
origin: com.netflix.hystrix/hystrix-javanica

/**
 * Invokes the method. Also private method also can be invoked.
 *
 * @return result of execution
 */
@Override
public Object executeWithArgs(ExecutionType executionType, Object[] args) throws CommandActionExecutionException {
  if(ExecutionType.ASYNCHRONOUS == executionType){
    Closure closure = AsyncClosureFactory.getInstance().createClosure(metaHolder, method, object, args);
    return executeClj(closure.getClosureObj(), closure.getClosureMethod());
  }
  return execute(object, method, args);
}
origin: com.netflix.hystrix/hystrix-javanica

public HystrixGeneratedCacheKey generateCacheKey(CacheInvocationContext<? extends Annotation> cacheInvocationContext) throws HystrixCacheKeyGenerationException {
  MethodExecutionAction cacheKeyMethod = cacheInvocationContext.getCacheKeyMethod();
  if (cacheKeyMethod != null) {
    try {
      return new DefaultHystrixGeneratedCacheKey((String) cacheKeyMethod.execute(cacheInvocationContext.getExecutionType()));
    } catch (Throwable throwable) {
      throw new HystrixCacheKeyGenerationException(throwable);
    }
  } else {
    if (cacheInvocationContext.hasKeyParameters()) {
      StringBuilder cacheKeyBuilder = new StringBuilder();
      for (CacheInvocationParameter parameter : cacheInvocationContext.getKeyParameters()) {
        CacheKey cacheKey = parameter.getCacheKeyAnnotation();
        if (cacheKey != null && StringUtils.isNotBlank(cacheKey.value())) {
          appendPropertyValue(cacheKeyBuilder, Arrays.asList(StringUtils.split(cacheKey.value(), ".")), parameter.getValue());
        } else {
          cacheKeyBuilder.append(parameter.getValue());
        }
      }
      return new DefaultHystrixGeneratedCacheKey(cacheKeyBuilder.toString());
    } else {
      return DefaultHystrixGeneratedCacheKey.EMPTY;
    }
  }
}
com.netflix.hystrix.contrib.javanica.commandMethodExecutionActionexecute

Javadoc

Invokes the method.

Popular methods of MethodExecutionAction

  • <init>
  • executeClj
  • executeWithArgs
    Invokes the method. Also private method also can be invoked.
  • getMethod
  • propagateCause
    Retrieves cause exception and wraps to CommandActionExecutionException.

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • setRequestProperty (URLConnection)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top plugins for WebStorm
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