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


Java TracerDriver类代码示例

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


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

示例1: ConnectionState

import org.apache.curator.drivers.TracerDriver; //导入依赖的package包/类
ConnectionState(ZookeeperFactory zookeeperFactory, EnsembleProvider ensembleProvider, int sessionTimeoutMs, int connectionTimeoutMs, Watcher parentWatcher, AtomicReference<TracerDriver> tracer, boolean canBeReadOnly, ConnectionHandlingPolicy connectionHandlingPolicy)
{
    this.ensembleProvider = ensembleProvider;
    this.sessionTimeoutMs = sessionTimeoutMs;
    this.connectionTimeoutMs = connectionTimeoutMs;
    this.tracer = tracer;
    this.connectionHandlingPolicy = connectionHandlingPolicy;
    if ( parentWatcher != null )
    {
        parentWatchers.offer(parentWatcher);
    }

    zooKeeper = new HandleHolder(zookeeperFactory, this, ensembleProvider, sessionTimeoutMs, canBeReadOnly);
}
 
开发者ID:apache,项目名称:curator,代码行数:15,代码来源:ConnectionState.java

示例2: getInstance_TracerDriver_ReturnsValue

import org.apache.curator.drivers.TracerDriver; //导入依赖的package包/类
@Test
public void getInstance_TracerDriver_ReturnsValue() {
    TracerDriver driver = Guice.createInjector(new MetricsModule()).getInstance(
            Key.get(TracerDriver.class, Curator.class));

    assertNotNull(driver);
}
 
开发者ID:ReadyTalk,项目名称:cultivar,代码行数:8,代码来源:MetricsModuleTest.java

示例3: configure

import org.apache.curator.drivers.TracerDriver; //导入依赖的package包/类
@Override
protected void configure() {
    install(new PrivateModule() {
        @Override
        protected void configure() {
            requireBinding(MetricRegistry.class);

            bindConstant().annotatedWith(Names.named("Cultivar.Metrics.prefix")).to(prefix);

            bind(TracerDriver.class).to(MetricsTracerDriver.class);

            expose(TracerDriver.class);

            bind(ConnectionStateMetricsListener.class).in(Singleton.class);

            expose(ConnectionStateMetricsListener.class);
        }
    });

    Multibinder<ConnectionStateListener> listeners = Multibinder.newSetBinder(binder(),
            ConnectionStateListener.class);

    listeners.addBinding().to(ConnectionStateMetricsListener.class);

}
 
开发者ID:dclements,项目名称:cultivar_old,代码行数:26,代码来源:MetricsModule.java

示例4: getInstance_TracerDriver_ReturnsValue

import org.apache.curator.drivers.TracerDriver; //导入依赖的package包/类
@Test
public void getInstance_TracerDriver_ReturnsValue() {
    TracerDriver driver = Guice.createInjector(new MetricsModule()).getInstance(TracerDriver.class);

    assertNotNull(driver);
}
 
开发者ID:dclements,项目名称:cultivar_old,代码行数:7,代码来源:MetricsModuleTest.java

示例5: RetryLoop

import org.apache.curator.drivers.TracerDriver; //导入依赖的package包/类
RetryLoop(RetryPolicy retryPolicy, AtomicReference<TracerDriver> tracer)
{
    this.retryPolicy = retryPolicy;
    this.tracer = tracer;
}
 
开发者ID:apache,项目名称:curator,代码行数:6,代码来源:RetryLoop.java

示例6: OperationTrace

import org.apache.curator.drivers.TracerDriver; //导入依赖的package包/类
public OperationTrace(String name, TracerDriver driver) {
  this(name, driver, -1);
}
 
开发者ID:apache,项目名称:curator,代码行数:4,代码来源:OperationTrace.java

示例7: configure

import org.apache.curator.drivers.TracerDriver; //导入依赖的package包/类
@Override
protected void configure() {
    install(new PrivateModule() {
        @Override
        protected void configure() {
            requireBinding(MetricRegistry.class);

            bindConstant().annotatedWith(Names.named("Cultivar.Metrics.prefix")).to(prefix);

            bind(TracerDriver.class).annotatedWith(Curator.class).to(MetricsTracerDriver.class);

            expose(TracerDriver.class).annotatedWith(Curator.class);

            bind(ConnectionStateMetricsListener.class).in(Singleton.class);

            expose(ConnectionStateMetricsListener.class);
        }
    });

    Multibinder<ConnectionStateListener> listeners = Multibinder.newSetBinder(binder(),
            ConnectionStateListener.class);

    listeners.addBinding().to(ConnectionStateMetricsListener.class);

}
 
开发者ID:ReadyTalk,项目名称:cultivar,代码行数:26,代码来源:MetricsModule.java

示例8: setTracerDriver

import org.apache.curator.drivers.TracerDriver; //导入依赖的package包/类
@Inject(optional = true)
public void setTracerDriver(@Curator final TracerDriver tracerDriver) {

    this.tracerDriver = Optional.of(tracerDriver);

}
 
开发者ID:dclements,项目名称:cultivar_old,代码行数:7,代码来源:CuratorFrameworkProvider.java

示例9: TimeTrace

import org.apache.curator.drivers.TracerDriver; //导入依赖的package包/类
/**
 * Create and start a timer
 *
 * @param name name of the event
 * @param driver driver
 */
public TimeTrace(String name, TracerDriver driver)
{
    this.name = name;
    this.driver = driver;
}
 
开发者ID:apache,项目名称:curator,代码行数:12,代码来源:TimeTrace.java

示例10: getTracerDriver

import org.apache.curator.drivers.TracerDriver; //导入依赖的package包/类
/**
 * Return the current tracing driver
 *
 * @return tracing driver
 */
public TracerDriver getTracerDriver()
{
    return tracer.get();
}
 
开发者ID:apache,项目名称:curator,代码行数:10,代码来源:CuratorZookeeperClient.java

示例11: setTracerDriver

import org.apache.curator.drivers.TracerDriver; //导入依赖的package包/类
/**
 * Change the tracing driver
 *
 * @param tracer new tracing driver
 */
public void setTracerDriver(TracerDriver tracer)
{
    this.tracer.set(tracer);
}
 
开发者ID:apache,项目名称:curator,代码行数:10,代码来源:CuratorZookeeperClient.java


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