当前位置: 首页>>代码示例>>Java>>正文


Java TenacityPropertyKeyFactory类代码示例

本文整理汇总了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);
    }
}
 
开发者ID:yammer,项目名称:tenacity,代码行数:35,代码来源:TenacityConfiguredBundle.java

示例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;
}
 
开发者ID:yammer,项目名称:tenacity,代码行数:10,代码来源:AbstractTenacityPropertyKeys.java

示例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);
}
 
开发者ID:yammer,项目名称:tenacity,代码行数:4,代码来源:TenacityConfigurationResource.java

示例5: TenacityCircuitBreakersResource

import com.yammer.tenacity.core.properties.TenacityPropertyKeyFactory; //导入依赖的package包/类
public TenacityCircuitBreakersResource(Collection<TenacityPropertyKey> keys,
                                       TenacityPropertyKeyFactory keyFactory) {
    this.keys = keys;
    this.keyFactory = keyFactory;
}
 
开发者ID:yammer,项目名称:tenacity,代码行数:6,代码来源:TenacityCircuitBreakersResource.java

示例6: getTenacityPropertyKeyFactory

import com.yammer.tenacity.core.properties.TenacityPropertyKeyFactory; //导入依赖的package包/类
@Override
public TenacityPropertyKeyFactory getTenacityPropertyKeyFactory(Configuration applicationConfiguration) {
    return new StringTenacityPropertyKeyFactory();
}
 
开发者ID:yammer,项目名称:tenacity,代码行数:5,代码来源:TenacityConfiguredBundleBuilderTest.java

示例7: FakeResource

import com.yammer.tenacity.core.properties.TenacityPropertyKeyFactory; //导入依赖的package包/类
public FakeResource(TenacityPropertyKeyFactory factory) {
    this.factory = factory;
}
 
开发者ID:yammer,项目名称:tenacity,代码行数:4,代码来源:TenacityExceptionMapperTest.java

示例8: getTenacityPropertyKeyFactory

import com.yammer.tenacity.core.properties.TenacityPropertyKeyFactory; //导入依赖的package包/类
TenacityPropertyKeyFactory getTenacityPropertyKeyFactory(T applicationConfiguration); 
开发者ID:yammer,项目名称:tenacity,代码行数:2,代码来源:TenacityBundleConfigurationFactory.java


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