Package com.alibaba.otter.shared.common.utils.thread

Examples of com.alibaba.otter.shared.common.utils.thread.NamedThreadFactory


        }
    }

    private synchronized void start() {
        if (executor == null) {
            executor = new ScheduledThreadPoolExecutor(DEFAULT_POOL, new NamedThreadFactory("Self-Monitor"),
                                                       new ThreadPoolExecutor.CallerRunsPolicy());
        }
        if (future == null) {
            future = executor.scheduleWithFixedDelay(new Runnable() {
View Full Code Here


    @Override
    public void afterPropertiesSet() throws Exception {
        nThreads = nThreads <= 0 ? DEFAULT_THREADS : nThreads;
        executor = new ThreadPoolExecutor(nThreads, nThreads, 0, TimeUnit.MILLISECONDS,
                                          new LinkedBlockingQueue<Runnable>(nThreads * 2),
                                          new NamedThreadFactory("global monitor", false),
                                          new ThreadPoolExecutor.CallerRunsPolicy());

    }
View Full Code Here

        return pathMap;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        collectorExecutor = Executors.newScheduledThreadPool(singleSize, new NamedThreadFactory("collector-thread",
                                                                                                true));
        startCollect();
    }
View Full Code Here

TOP

Related Classes of com.alibaba.otter.shared.common.utils.thread.NamedThreadFactory

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.