本文整理汇总了Java中com.netflix.client.config.IClientConfig.get方法的典型用法代码示例。如果您正苦于以下问题:Java IClientConfig.get方法的具体用法?Java IClientConfig.get怎么用?Java IClientConfig.get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.netflix.client.config.IClientConfig
的用法示例。
在下文中一共展示了IClientConfig.get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import com.netflix.client.config.IClientConfig; //导入方法依赖的package包/类
@Override
public RibbonResponse execute(RibbonRequest request, IClientConfig configOverride)
throws IOException {
Request.Options options;
if (configOverride != null) {
options =
new Request.Options(
configOverride.get(CommonClientConfigKey.ConnectTimeout, connectTimeout),
(configOverride.get(CommonClientConfigKey.ReadTimeout, readTimeout)));
} else {
options = new Request.Options(connectTimeout, readTimeout);
}
Response response = request.client().execute(request.toRequest(), options);
return new RibbonResponse(request.getUri(), response);
}
示例2: getRequestSpecificRetryHandler
import com.netflix.client.config.IClientConfig; //导入方法依赖的package包/类
@Override
public RequestSpecificRetryHandler getRequestSpecificRetryHandler(RibbonRequest request, IClientConfig requestConfig) {
IClientConfig ribbonRequestConfiguration = Optional.ofNullable(requestConfig).orElse(clientConfig);
boolean retryAllOperations = ribbonRequestConfiguration.get(IClientConfigKey.Keys.OkToRetryOnAllOperations,
DefaultClientConfigImpl.DEFAULT_OK_TO_RETRY_ON_ALL_OPERATIONS);
return new RequestSpecificRetryHandler(true, (retryAllOperations || request.isGet()) , RetryHandler.DEFAULT, ribbonRequestConfiguration);
}
示例3: LBClient
import com.netflix.client.config.IClientConfig; //导入方法依赖的package包/类
LBClient(ILoadBalancer lb, IClientConfig clientConfig) {
super(lb, clientConfig);
this.clientConfig = clientConfig;
connectTimeout = clientConfig.get(CommonClientConfigKey.ConnectTimeout);
readTimeout = clientConfig.get(CommonClientConfigKey.ReadTimeout);
}
示例4: initWithNiwsConfig
import com.netflix.client.config.IClientConfig; //导入方法依赖的package包/类
@Override
public void initWithNiwsConfig(IClientConfig config) {
this.appName = config.getClientName();
this.isSecure = config.get(IClientConfigKey.Keys.IsSecure, false);
}