Examples of HystrixCommand


Examples of com.netflix.hystrix.HystrixCommand

            }
        });
    }

    public static HystrixCommand getHystrixCommandByKey(String key) {
        HystrixCommand hystrixCommand = null;
        Collection<HystrixCommand<?>> executedCommands =
                HystrixRequestLog.getCurrentRequest().getExecutedCommands();
        for (HystrixCommand command : executedCommands) {
            if (command.getCommandKey().name().equals(key)) {
                hystrixCommand = command;
View Full Code Here

Examples of com.netflix.hystrix.HystrixCommand

         * @param executor Executor used to execute this request.
         * @return
         */
        @SuppressWarnings({ "rawtypes", "unchecked" })
    public Builder withCommandData(Executor executor) {
            HystrixCommand command = (HystrixCommand) executor;
            withEventList(command.getExecutionEvents())
                    .withExecutionTime(command.getExecutionTimeInMilliseconds())
                    .withException((Exception) command.getFailedExecutionException());
            return this;
        }
View Full Code Here

Examples of com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand

        Method method = getMethodFromTarget(joinPoint);
        Object obj = joinPoint.getTarget();
        Object[] args = joinPoint.getArgs();
        Validate.notNull(method, "failed to get method from joinPoint: %s", joinPoint);
        HystrixCommand hystrixCommand = method.getAnnotation(HystrixCommand.class);
        HystrixCollapser hystrixCollapser = method.getAnnotation(HystrixCollapser.class);
        ExecutionType executionType = ExecutionType.getExecutionType(method.getReturnType());
        Method cacheKeyMethod = getMethodFromTarget(joinPoint, hystrixCommand.cacheKeyMethod());
        MetaHolder metaHolder = MetaHolder.builder()
                .args(args).method(method).obj(obj).proxyObj(joinPoint.getThis())
                .cacheKeyMethod(cacheKeyMethod).executionType(executionType)
                .hystrixCommand(hystrixCommand).hystrixCollapser(hystrixCollapser)
                .defaultCommandKey(method.getName())
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.