• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IPing类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.netflix.loadbalancer.IPing的典型用法代码示例。如果您正苦于以下问题:Java IPing类的具体用法?Java IPing怎么用?Java IPing使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IPing类属于com.netflix.loadbalancer包,在下文中一共展示了IPing类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: loadBalancer

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
/**
 * The load balancer definition.
 *
 * @param config            the client config.
 * @param serverList        the server list.
 * @param serverListFilter  the server list filter.
 * @param rule              the load balancing rule.
 * @param ping              the ping strategy.
 * @param serverListUpdater the server list updater.
 * @return The Dynamic Server List Load Balancer.
 */
@Bean
@ConditionalOnMissingBean
public ILoadBalancer loadBalancer(IClientConfig config,
                                  ServerList<Server> serverList,
                                  ServerListFilter<Server> serverListFilter,
                                  IRule rule, IPing ping,
                                  ServerListUpdater serverListUpdater) {
    log.debug("dynamic server list load balancer enabled.");
    return new DynamicServerListLoadBalancer<>(config, rule, ping, serverList,
            serverListFilter, serverListUpdater);
}
 
开发者ID:enadim,项目名称:spring-cloud-ribbon-extensions,代码行数:23,代码来源:RuleBaseConfig.java


示例2: ribbonLoadBalancer

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean
public ILoadBalancer ribbonLoadBalancer(IClientConfig config,
										ServerList<Server> serverList, ServerListFilter<Server> serverListFilter,
										IRule rule, IPing ping) {
	ZoneAwareLoadBalancer<Server> balancer = LoadBalancerBuilder.newBuilder()
			.withClientConfig(config).withRule(rule).withPing(ping)
			.withServerListFilter(serverListFilter).withDynamicServerList(serverList)
			.buildDynamicServerListLoadBalancer();
	return new DemoLoadBalancer(balancer);
}
 
开发者ID:spencergibb,项目名称:ribbondemo,代码行数:12,代码来源:RibbonDemoRibbonConfig.java


示例3: dependenciesBasedLoadBalancer

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean
@ConditionalOnDependenciesPassed
@ConditionalOnProperty(value = "spring.cloud.zookeeper.dependency.ribbon.loadbalancer", matchIfMissing = true)
public ILoadBalancer dependenciesBasedLoadBalancer(ZookeeperDependencies zookeeperDependencies,
		ServerList<?> serverList, IClientConfig config, IPing iPing) {
	return new DependenciesBasedLoadBalancer(zookeeperDependencies, serverList, config, iPing);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-zookeeper,代码行数:9,代码来源:ZookeeperRibbonClientConfiguration.java


示例4: DependenciesBasedLoadBalancer

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
public DependenciesBasedLoadBalancer(ZookeeperDependencies zookeeperDependencies, ServerList<?> serverList, IClientConfig config, IPing iPing) {
	super(config);
	this.zookeeperDependencies = zookeeperDependencies;
	setServersList(serverList.getInitialListOfServers());
	setPing(iPing);
	setServerListImpl(serverList);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-zookeeper,代码行数:8,代码来源:DependenciesBasedLoadBalancer.java


示例5: PropertiesFactory

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
public PropertiesFactory() {
	classToProperty.put(ILoadBalancer.class, "NFLoadBalancerClassName");
	classToProperty.put(IPing.class, "NFLoadBalancerPingClassName");
	classToProperty.put(IRule.class, "NFLoadBalancerRuleClassName");
	classToProperty.put(ServerList.class, "NIWSServerListClassName");
	classToProperty.put(ServerListFilter.class, "NIWSServerListFilterClassName");
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-netflix,代码行数:8,代码来源:PropertiesFactory.java


示例6: ribbonPing

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean
public IPing ribbonPing(IClientConfig config) {
	if (this.propertiesFactory.isSet(IPing.class, name)) {
		return this.propertiesFactory.get(IPing.class, config, name);
	}
	return new DummyPing();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-netflix,代码行数:9,代码来源:RibbonClientConfiguration.java


示例7: ribbonLoadBalancer

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean
public ILoadBalancer ribbonLoadBalancer(IClientConfig config,
		ServerList<Server> serverList, ServerListFilter<Server> serverListFilter,
		IRule rule, IPing ping, ServerListUpdater serverListUpdater) {
	if (this.propertiesFactory.isSet(ILoadBalancer.class, name)) {
		return this.propertiesFactory.get(ILoadBalancer.class, config, name);
	}
	return new ZoneAwareLoadBalancer<>(config, rule, ping, serverList,
			serverListFilter, serverListUpdater);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-netflix,代码行数:12,代码来源:RibbonClientConfiguration.java


示例8: ribbonPing

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean
public IPing ribbonPing(IClientConfig config) {
	if (this.propertiesFactory.isSet(IPing.class, serviceId)) {
		return this.propertiesFactory.get(IPing.class, config, serviceId);
	}
	NIWSDiscoveryPing ping = new NIWSDiscoveryPing();
	ping.initWithNiwsConfig(config);
	return ping;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-netflix,代码行数:11,代码来源:EurekaRibbonClientConfiguration.java


示例9: ribbonLoadBalancer

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
@Bean
public ILoadBalancer ribbonLoadBalancer(IClientConfig config,
		ServerList<Server> serverList, IRule rule, IPing ping) {

	goodServer = new Server("localhost", this.port);
	badServer = new Server("mybadhost", 10001);
	badServer2 = new Server("localhost", SocketUtils.findAvailableTcpPort());

	balancer = LoadBalancerBuilder.newBuilder().withClientConfig(config)
			.withRule(rule).withPing(ping).buildFixedServerListLoadBalancer(
					Arrays.asList(badServer, badServer2, goodServer));
	return balancer;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-netflix,代码行数:14,代码来源:RestTemplateRetryTests.java


示例10: ribbonPing

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
@Bean
public IPing ribbonPing(IClientConfig config) {
	return new PingUrl();
}
 
开发者ID:daflockinger,项目名称:poppynotes,代码行数:5,代码来源:RibbonConfig.java


示例11: ribbonPing

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean
public IPing ribbonPing() {
    return new MarathonPing();
}
 
开发者ID:aatarasoff,项目名称:spring-cloud-marathon,代码行数:6,代码来源:MarathonRibbonClientConfiguration.java


示例12: noOp

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
@Produces
@LoadBalancer(LoadBalancer.Type.Fixed)
@Dependent
public IPing noOp() {
    return new NoOpPing();
}
 
开发者ID:lreimer,项目名称:cloud-native-javaee,代码行数:7,代码来源:PingProducer.java


示例13: dummy

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
@Produces
@Default
@Dependent
public IPing dummy() {
    return new DummyPing();
}
 
开发者ID:lreimer,项目名称:cloud-native-javaee,代码行数:7,代码来源:PingProducer.java


示例14: getPing

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
public IPing getPing() {
    return ping;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:RibbonConfiguration.java


示例15: setPing

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
public void setPing(IPing ping) {
    this.ping = ping;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:RibbonConfiguration.java


示例16: healthCheckingRule

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean
@ConditionalOnDependenciesPassed
public IPing healthCheckingRule(ZookeeperDependencies zookeeperDependencies) {
	return new PingUrl(false, zookeeperDependencies.getDefaultHealthEndpoint());
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-zookeeper,代码行数:7,代码来源:ZookeeperRibbonClientConfiguration.java


示例17: noOpPing

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
@Bean IPing noOpPing() {
	return new NoOpPing();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-zookeeper,代码行数:4,代码来源:StickyRuleTests.java


示例18: ribbonPing

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
@Bean
public IPing ribbonPing() {
	return new PingUrl();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-netflix,代码行数:5,代码来源:RibbonClientsPreprocessorIntegrationTests.java


示例19: ribbonPing

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
@Bean
public IPing ribbonPing() {
	return new DummyPing();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-netflix,代码行数:5,代码来源:RibbonClientPreprocessorOverridesIntegrationTests.java


示例20: ribbonPing

import com.netflix.loadbalancer.IPing; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean
public IPing ribbonPing() {
	return new ConsulPing();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-consul,代码行数:6,代码来源:ConsulRibbonClientConfiguration.java



注:本文中的com.netflix.loadbalancer.IPing类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IOFConnection类代码示例发布时间:2022-05-22
下一篇:
Java ConcatDeleteOp类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap