Java 类io.reactivex.netty.servo.ServoEventsListenerFactory 实例源码

项目:azure-documentdb-java    文件:RxAsyncBulkInsertBenchmark.java   
@Override
protected void onInit() throws Exception {

    if (cfg.isRxEnableNativeLinuxEpoll()) {
        System.out.println("Enabling Native Linux Transport...");
        RxNetty.useNativeTransportIfApplicable();
    }

    RxNetty.useMetricListenersFactory(new ServoEventsListenerFactory());
    Builder builder = new AsyncDocumentClient.Builder()
            .withServiceEndpoint(cfg.getServiceEndpoint())
            .withMasterKey(cfg.getMasterKey())
            .withConnectionPolicy(cfg.getConnectionPolicy())
            .withConsistencyLevel(cfg.getConsistencyLevel());

    this.rxDocumentClient = builder.build();
}
项目:azure-documentdb-rxjava    文件:SyncBulkInsertBenchmark.java   
@Override
protected void onInit() throws Exception {
    RxNetty.useMetricListenersFactory(new ServoEventsListenerFactory());
    documentClient = new DocumentClient(cfg.getServiceEndpoint(), cfg.getMasterKey(),
            cfg.getConnectionPolicy(), cfg.getConsistencyLevel());

    ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(cfg.getConcurrency(), cfg.getConcurrency(),
            10, TimeUnit.MINUTES, new ArrayBlockingQueue<Runnable>(cfg.getConcurrency(), true),
            new ThreadPoolExecutor.CallerRunsPolicy());

    this.executor = MoreExecutors.listeningDecorator(threadPoolExecutor);
}
项目:azure-documentdb-rxjava    文件:RxAsyncBulkInsertBenchmark.java   
@Override
protected void onInit() throws Exception {

    if (cfg.isRxEnableNativeLinuxEpoll()) {
        System.out.println("Enabling Native Linux Transport...");
        RxNetty.useNativeTransportIfApplicable();
    }

    RxNetty.useMetricListenersFactory(new ServoEventsListenerFactory());
    Builder builder = new AsyncDocumentClient.Builder()
            .withServiceEndpoint(cfg.getServiceEndpoint())
            .withMasterKey(cfg.getMasterKey())
            .withConnectionPolicy(cfg.getConnectionPolicy())
            .withConsistencyLevel(cfg.getConsistencyLevel());

    this.rxDocumentClient = builder.build();
}
项目:azure-documentdb-java    文件:SyncBulkInsertBenchmark.java   
@Override
protected void onInit() throws Exception {
    RxNetty.useMetricListenersFactory(new ServoEventsListenerFactory());
    documentClient = new DocumentClient(cfg.getServiceEndpoint(), cfg.getMasterKey(),
            cfg.getConnectionPolicy(), cfg.getConsistencyLevel());

    ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(cfg.getConcurrency(), cfg.getConcurrency(),
            10, TimeUnit.MINUTES, new ArrayBlockingQueue<Runnable>(cfg.getConcurrency(), true),
            new ThreadPoolExecutor.CallerRunsPolicy());

    this.executor = MoreExecutors.listeningDecorator(threadPoolExecutor);
}
项目:karyon    文件:KaryonServoModule.java   
@Override
protected void configure() {
    RxNetty.useMetricListenersFactory(new ServoEventsListenerFactory());
}