Tabnine Logo
HystrixCachingException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.netflix.hystrix.contrib.javanica.exception.HystrixCachingException
constructor

Best Java code snippets using com.netflix.hystrix.contrib.javanica.exception.HystrixCachingException.<init> (Showing top 2 results out of 315)

origin: PipelineAI/pipeline

private static MethodExecutionAction createCacheKeyAction(String method, MetaHolder metaHolder) {
  MethodExecutionAction cacheKeyAction = null;
  if (StringUtils.isNotBlank(method)) {
    Method cacheKeyMethod = getDeclaredMethod(metaHolder.getObj().getClass(), method,
        metaHolder.getMethod().getParameterTypes());
    if (cacheKeyMethod == null) {
      throw new HystrixCachingException("method with name '" + method + "' doesn't exist in class '"
          + metaHolder.getObj().getClass() + "'");
    }
    if (!cacheKeyMethod.getReturnType().equals(String.class)) {
      throw new HystrixCachingException("return type of cacheKey method must be String. Method: '" + method + "', Class: '"
          + metaHolder.getObj().getClass() + "'");
    }
    MetaHolder cMetaHolder = MetaHolder.builder().obj(metaHolder.getObj()).method(cacheKeyMethod).args(metaHolder.getArgs()).build();
    cacheKeyAction = new MethodExecutionAction(cMetaHolder.getObj(), cacheKeyMethod, cMetaHolder.getArgs(), cMetaHolder);
  }
  return cacheKeyAction;
}
origin: com.netflix.hystrix/hystrix-javanica

private static MethodExecutionAction createCacheKeyAction(String method, MetaHolder metaHolder) {
  MethodExecutionAction cacheKeyAction = null;
  if (StringUtils.isNotBlank(method)) {
    Method cacheKeyMethod = getDeclaredMethod(metaHolder.getObj().getClass(), method,
        metaHolder.getMethod().getParameterTypes());
    if (cacheKeyMethod == null) {
      throw new HystrixCachingException("method with name '" + method + "' doesn't exist in class '"
          + metaHolder.getObj().getClass() + "'");
    }
    if (!cacheKeyMethod.getReturnType().equals(String.class)) {
      throw new HystrixCachingException("return type of cacheKey method must be String. Method: '" + method + "', Class: '"
          + metaHolder.getObj().getClass() + "'");
    }
    MetaHolder cMetaHolder = MetaHolder.builder().obj(metaHolder.getObj()).method(cacheKeyMethod).args(metaHolder.getArgs()).build();
    cacheKeyAction = new MethodExecutionAction(cMetaHolder.getObj(), cacheKeyMethod, cMetaHolder.getArgs(), cMetaHolder);
  }
  return cacheKeyAction;
}
com.netflix.hystrix.contrib.javanica.exceptionHystrixCachingException<init>

Popular methods of HystrixCachingException

    Popular in Java

    • Reactive rest calls using spring rest template
    • requestLocationUpdates (LocationManager)
    • addToBackStack (FragmentTransaction)
    • getApplicationContext (Context)
    • Table (com.google.common.collect)
      A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
    • ServerSocket (java.net)
      This class represents a server-side socket that waits for incoming client connections. A ServerSocke
    • MessageDigest (java.security)
      Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
    • Random (java.util)
      This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
    • JOptionPane (javax.swing)
    • LogFactory (org.apache.commons.logging)
      Factory for creating Log instances, with discovery and configuration features similar to that employ
    • Best plugins for Eclipse
    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