com.baidu.jprotobuf.pbrpc.client.ha.lb.failover
类 SocketFailOverInterceptor

java.lang.Object
  继承者 com.baidu.jprotobuf.pbrpc.client.ha.lb.failover.SocketFailOverInterceptor
所有已实现的接口:
FailOverInterceptor

public class SocketFailOverInterceptor
extends Object
implements FailOverInterceptor

Socket fail over intercepter.

从以下版本开始:
2.16
作者:
xiemalin

构造方法摘要
SocketFailOverInterceptor()
           
 
方法摘要
 boolean isAvailable(Object o, Method m, String beanKey)
          return if target is available.
 boolean isDoFailover(Throwable t, String beanKey)
          return is catch exception need do fail over action
 boolean isRecover(Object o, Method m, String beanKey)
          return if failed target is recovered
protected  com.baidu.jprotobuf.pbrpc.client.ha.lb.failover.SocketFailOverInterceptor.Host parseHost(String beanKey)
           
 void setRecoverServiceUrls(Map<String,String> recoverServiceUrls)
          format as: localhost:80
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

SocketFailOverInterceptor

public SocketFailOverInterceptor()
方法详细信息

setRecoverServiceUrls

public void setRecoverServiceUrls(Map<String,String> recoverServiceUrls)
format as: localhost:80

参数:
recoverServiceUrls -

isAvailable

public boolean isAvailable(Object o,
                           Method m,
                           String beanKey)
从接口 FailOverInterceptor 复制的描述
return if target is available.

指定者:
接口 FailOverInterceptor 中的 isAvailable
返回:
true if available

isRecover

public boolean isRecover(Object o,
                         Method m,
                         String beanKey)
从接口 FailOverInterceptor 复制的描述
return if failed target is recovered

指定者:
接口 FailOverInterceptor 中的 isRecover
返回:
true if recovered

isDoFailover

public boolean isDoFailover(Throwable t,
                            String beanKey)
从接口 FailOverInterceptor 复制的描述
return is catch exception need do fail over action

指定者:
接口 FailOverInterceptor 中的 isDoFailover
返回:
true if do fail over action

parseHost

protected com.baidu.jprotobuf.pbrpc.client.ha.lb.failover.SocketFailOverInterceptor.Host parseHost(String beanKey)


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