Package com.codahale.metrics

Examples of com.codahale.metrics.InstrumentedThreadFactory


    private ExecutorService executorService(int nThreads) {
        return new InstrumentedExecutorService(Executors.newFixedThreadPool(nThreads, threadFactory()), metricRegistry);
    }

    private ThreadFactory threadFactory() {
        return new InstrumentedThreadFactory(
                new ThreadFactoryBuilder().setDaemon(true).setNameFormat("eventbus-handler-%d").build(), metricRegistry);
    }
View Full Code Here


        return new InstrumentedExecutorService(
                Executors.newCachedThreadPool(threadFactory(nameFormat, metricRegistry)), metricRegistry);
    }

    private static ThreadFactory threadFactory(final String nameFormat, final MetricRegistry metricRegistry) {
        return new InstrumentedThreadFactory(
                new ThreadFactoryBuilder().setNameFormat(nameFormat).build(), metricRegistry);
    }
View Full Code Here

        return new InstrumentedScheduledExecutorService(
                Executors.newSingleThreadScheduledExecutor(threadFactory()), metricRegistry);
    }

    private ThreadFactory threadFactory() {
        return new InstrumentedThreadFactory(
                new ThreadFactoryBuilder().setNameFormat("disk-journal-" + getDbFileName() + "-%d").build(),
                metricRegistry);
    }
View Full Code Here

                corePoolSize, maxPoolSize, keepAliveTime, TimeUnit.MILLISECONDS,
                new LinkedBlockingQueue<Runnable>(), threadFactory(metricRegistry, nameFormat)), metricRegistry);
    }

    private ThreadFactory threadFactory(final MetricRegistry metricRegistry, final String nameFormat) {
        return new InstrumentedThreadFactory(
                new ThreadFactoryBuilder().setNameFormat(nameFormat).build(),
                metricRegistry);
    }
View Full Code Here

    private ExecutorService executorService() {
        return new InstrumentedExecutorService(Executors.newCachedThreadPool(threadFactory()), metricRegistry);
    }

    private ThreadFactory threadFactory() {
        return new InstrumentedThreadFactory(new ThreadFactoryBuilder()
                .setNameFormat("stream-router-%d")
                .setDaemon(true)
                .build(), metricRegistry);
    }
View Full Code Here

        return new InstrumentedExecutorService(
                Executors.newCachedThreadPool(threadFactory(metricRegistry)), metricRegistry);
    }

    private ThreadFactory threadFactory(MetricRegistry metricRegistry) {
        return new InstrumentedThreadFactory(
                new ThreadFactoryBuilder().setNameFormat("processbufferprocessor-%d").build(), metricRegistry);
    }
View Full Code Here

        return new InstrumentedExecutorService(
                Executors.newCachedThreadPool(threadFactory(metricRegistry)), metricRegistry);
    }

    private ThreadFactory threadFactory(final MetricRegistry metricRegistry) {
        return new InstrumentedThreadFactory(
                new ThreadFactoryBuilder().setNameFormat("inputs-%d").build(),
                metricRegistry);
    }
View Full Code Here

        return new InstrumentedExecutorService(
                Executors.newFixedThreadPool(THREAD_POOL_SIZE, threadFactory(metricRegistry)), metricRegistry);
    }

    private ThreadFactory threadFactory(final MetricRegistry metricRegistry) {
        return new InstrumentedThreadFactory(
                new ThreadFactoryBuilder().setNameFormat("systemjob-executor-%d").build(),
                metricRegistry);
    }
View Full Code Here

        return new InstrumentedExecutorService(Executors.newCachedThreadPool(
                threadFactory(metricRegistry)), metricRegistry);
    }

    private ThreadFactory threadFactory(MetricRegistry metricRegistry) {
        return new InstrumentedThreadFactory(
                new ThreadFactoryBuilder().setNameFormat("outputbufferprocessor-%d").build(),
                metricRegistry);
    }
View Full Code Here

TOP

Related Classes of com.codahale.metrics.InstrumentedThreadFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.