Package org.lilyproject.util.concurrent

Examples of org.lilyproject.util.concurrent.CustomThreadFactory


        options.put(NettyTransceiver.NETTY_TCP_NODELAY_OPTION, NettyTransceiver.DEFAULT_TCP_NODELAY_VALUE);
        options.put("keepAlive", keepAlive);
        options.put(NettyTransceiver.NETTY_CONNECT_TIMEOUT_OPTION, NettyTransceiver.DEFAULT_CONNECTION_TIMEOUT_MILLIS);

        return new NettyTransceiver(address, new NioClientSocketChannelFactory(
                Executors.newCachedThreadPool(new DaemonThreadFactory(new CustomThreadFactory("avro-client-boss"))),
                Executors.newCachedThreadPool(new DaemonThreadFactory(new CustomThreadFactory("avro-client-worker")))),
                options);
    }
View Full Code Here


                log.debug("Creating ExecutorService for HTable with max threads = " + maxThreads);

                EXECUTOR_SERVICE = new ThreadPoolExecutor(1, maxThreads,
                        60, TimeUnit.SECONDS,
                        new SynchronousQueue<Runnable>(),
                        new CustomThreadFactory("hbase-batch", null, true),
                        new WaitPolicy());
                EXECUTOR_SERVICE_SHUTDOWN_PROTECTED = new ShutdownProtectedExecutor(EXECUTOR_SERVICE);

                try {
                    POOL_FIELD = HTable.class.getDeclaredField("pool");
View Full Code Here

    public void start() throws IOException, RepositoryException, InterruptedException {
        AvroLilyImpl avroLily = new AvroLilyImpl(repositoryManager,
                repositoryManager.getDefaultRepository().getTypeManager());
        Responder responder = new LilySpecificResponder(AvroLily.class, avroLily);

        ThreadFactory threadFactory = new CustomThreadFactory("avro-exechandler", new ThreadGroup("AvroExecHandler"));
        if (maxServerThreads == -1) {
            executorService = Executors.newCachedThreadPool(threadFactory);
            executionHandler = new ExecutionHandler(executorService);
        } else {
            executorService = new ThreadPoolExecutor(maxServerThreads / 3, maxServerThreads,
View Full Code Here

TOP

Related Classes of org.lilyproject.util.concurrent.CustomThreadFactory

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.