本文整理汇总了Java中com.yammer.tenacity.core.properties.TenacityPropertyKeyFactory类的典型用法代码示例。如果您正苦于以下问题:Java TenacityPropertyKeyFactory类的具体用法?Java TenacityPropertyKeyFactory怎么用?Java TenacityPropertyKeyFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TenacityPropertyKeyFactory类属于com.yammer.tenacity.core.properties包,在下文中一共展示了TenacityPropertyKeyFactory类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addTenacityResources
import com.yammer.tenacity.core.properties.TenacityPropertyKeyFactory; //导入依赖的package包/类
protected void addTenacityResources(Environment environment,
TenacityPropertyKeyFactory keyFactory,
Collection<TenacityPropertyKey> tenacityPropertyKeys) {
final String tenacityMetricsStream = "/tenacity/metrics.stream";
final TenacityConfigurationResource configurationResource = new TenacityConfigurationResource(keyFactory);
final TenacityCircuitBreakersResource circuitBreakersResource =
new TenacityCircuitBreakersResource(tenacityPropertyKeys, keyFactory);
final TenacityPropertyKeysResource propertyKeysResource = new TenacityPropertyKeysResource(tenacityPropertyKeys);
if (usingAdminPort) {
environment.admin()
.addServlet(tenacityMetricsStream, new HystrixMetricsStreamServlet())
.addMapping(tenacityMetricsStream);
environment.admin()
.addServlet(TenacityPropertyKeysResource.PATH,
new TenacityPropertyKeysServlet(environment.getObjectMapper(), propertyKeysResource))
.addMapping(TenacityPropertyKeysResource.PATH);
environment.admin()
.addServlet(TenacityConfigurationResource.PATH,
new TenacityConfigurationServlet(environment.getObjectMapper(), configurationResource))
.addMapping(TenacityConfigurationResource.PATH + "/*");
environment.admin()
.addServlet(TenacityCircuitBreakersResource.PATH,
new TenacityCircuitBreakersServlet(environment.getObjectMapper(), circuitBreakersResource))
.addMapping(TenacityCircuitBreakersResource.PATH + "/*");
} else {
environment.servlets()
.addServlet(tenacityMetricsStream, new HystrixMetricsStreamServlet())
.addMapping(tenacityMetricsStream);
environment.jersey().register(propertyKeysResource);
environment.jersey().register(configurationResource);
environment.jersey().register(circuitBreakersResource);
}
}
示例2: AbstractTenacityPropertyKeys
import com.yammer.tenacity.core.properties.TenacityPropertyKeyFactory; //导入依赖的package包/类
public AbstractTenacityPropertyKeys(TenacityPropertyKeyFactory keyFactory,
Iterable<TenacityPropertyKey> keys,
Iterable<ExceptionMapper<? extends Throwable>> exceptionMappers,
Optional<HystrixCommandExecutionHook> executionHook) {
this.keys = ImmutableList.copyOf(checkNotNull(keys));
this.keyFactory = checkNotNull(keyFactory);
this.exceptionMappers = ImmutableList.copyOf(checkNotNull(exceptionMappers));
this.executionHook = executionHook;
}
示例3: getTenacityPropertyKeyFactory
import com.yammer.tenacity.core.properties.TenacityPropertyKeyFactory; //导入依赖的package包/类
@Override
public TenacityPropertyKeyFactory getTenacityPropertyKeyFactory(LogProducerConfiguration logProducerConfiguration) {
return new LogProducerDependencyKeyFactory();
}
开发者ID:guggens,项目名称:log-dropwizard-eureka-mongo-sample,代码行数:5,代码来源:LogProducerTenacityBundleConfigurationFactory.java
示例4: TenacityConfigurationResource
import com.yammer.tenacity.core.properties.TenacityPropertyKeyFactory; //导入依赖的package包/类
public TenacityConfigurationResource(TenacityPropertyKeyFactory factory) {
this.factory = checkNotNull(factory);
}
示例5: TenacityCircuitBreakersResource
import com.yammer.tenacity.core.properties.TenacityPropertyKeyFactory; //导入依赖的package包/类
public TenacityCircuitBreakersResource(Collection<TenacityPropertyKey> keys,
TenacityPropertyKeyFactory keyFactory) {
this.keys = keys;
this.keyFactory = keyFactory;
}
示例6: getTenacityPropertyKeyFactory
import com.yammer.tenacity.core.properties.TenacityPropertyKeyFactory; //导入依赖的package包/类
@Override
public TenacityPropertyKeyFactory getTenacityPropertyKeyFactory(Configuration applicationConfiguration) {
return new StringTenacityPropertyKeyFactory();
}
示例7: FakeResource
import com.yammer.tenacity.core.properties.TenacityPropertyKeyFactory; //导入依赖的package包/类
public FakeResource(TenacityPropertyKeyFactory factory) {
this.factory = factory;
}
示例8: getTenacityPropertyKeyFactory
import com.yammer.tenacity.core.properties.TenacityPropertyKeyFactory; //导入依赖的package包/类
TenacityPropertyKeyFactory getTenacityPropertyKeyFactory(T applicationConfiguration);