Search in sources :

Example 1 with HystrixObservableCollapser

use of com.netflix.hystrix.HystrixObservableCollapser in project incubator-skywalking by apache.

the class HystrixCommandConstructorInterceptor method onConstruct.

@Override
public void onConstruct(EnhancedInstance objInst, Object[] allArguments) {
    String commandIdentify = "";
    if (HystrixCommand.class.isAssignableFrom(objInst.getClass())) {
        HystrixCommand hystrixCommand = (HystrixCommand) objInst;
        commandIdentify = hystrixCommand.getCommandKey().name();
    } else if (HystrixCollapser.class.isAssignableFrom(objInst.getClass())) {
        HystrixCollapser hystrixCollapser = (HystrixCollapser) objInst;
        commandIdentify = hystrixCollapser.getCollapserKey().name();
    } else if (HystrixObservableCollapser.class.isAssignableFrom(objInst.getClass())) {
        HystrixObservableCollapser hystrixObservableCollapser = (HystrixObservableCollapser) objInst;
        commandIdentify = hystrixObservableCollapser.getCollapserKey().name();
    } else if (HystrixObservableCommand.class.isAssignableFrom(objInst.getClass())) {
        HystrixObservableCommand hystrixObservableCommand = (HystrixObservableCommand) objInst;
        commandIdentify = hystrixObservableCommand.getCommandKey().name();
    }
    objInst.setSkyWalkingDynamicField(new EnhanceRequireObjectCache(OPERATION_NAME_PREFIX + commandIdentify));
}
Also used : HystrixCommand(com.netflix.hystrix.HystrixCommand) HystrixCollapser(com.netflix.hystrix.HystrixCollapser) HystrixObservableCommand(com.netflix.hystrix.HystrixObservableCommand) HystrixObservableCollapser(com.netflix.hystrix.HystrixObservableCollapser)

Aggregations

HystrixCollapser (com.netflix.hystrix.HystrixCollapser)1 HystrixCommand (com.netflix.hystrix.HystrixCommand)1 HystrixObservableCollapser (com.netflix.hystrix.HystrixObservableCollapser)1 HystrixObservableCommand (com.netflix.hystrix.HystrixObservableCommand)1