com.baidu.jprotobuf.pbrpc.client.ha.lb.strategy
接口 StrategyInterceptor

所有超级接口:
FailOverEvent

public interface StrategyInterceptor
extends FailOverEvent

load balance strategy intercepter.
it implements from FailOverEvent

从以下版本开始:
2.16
作者:
xiemalin
另请参见:
FailOverEvent

方法摘要
 void afterElection(String electKey, org.aopalliance.intercept.MethodInvocation invocation)
          after strategy elect method invoke
 void beforeElection(LoadBalanceStrategy lbStratety, org.aopalliance.intercept.MethodInvocation invocation)
          before strategy elect method invoke
 String elect(org.aopalliance.intercept.MethodInvocation invocation)
          do elect action
 boolean isDoElection(org.aopalliance.intercept.MethodInvocation invocation)
          return if need to do elect method.
 
从接口 com.baidu.jprotobuf.pbrpc.client.ha.lb.failover.FailOverEvent 继承的方法
onTargetFailed, onTargetRecover
 

方法详细信息

beforeElection

void beforeElection(LoadBalanceStrategy lbStratety,
                    org.aopalliance.intercept.MethodInvocation invocation)
before strategy elect method invoke

参数:
lbStratety - LoadBalanceStrategy
invocation - MethodInvocation

afterElection

void afterElection(String electKey,
                   org.aopalliance.intercept.MethodInvocation invocation)
after strategy elect method invoke

参数:
electKey - elect returned target name
invocation - MethodInvocation

isDoElection

boolean isDoElection(org.aopalliance.intercept.MethodInvocation invocation)
return if need to do elect method.

参数:
invocation - MethodInvocation
返回:
true if need to do elect method

elect

String elect(org.aopalliance.intercept.MethodInvocation invocation)
do elect action

参数:
invocation - MethodInvocation
返回:


Copyright © 2015 Baidu, Inc.. All Rights Reserved.