Package org.lilyproject.util.concurrent

Examples of org.lilyproject.util.concurrent.WaitPolicy


        this.repositoryName = repositoryName;
        this.tableName = tableName;
        this.bulkMode = bulkMode;
        executor = new ThreadPoolExecutor(numThreads, numThreads, 10, TimeUnit.SECONDS,
                new ArrayBlockingQueue<Runnable>(5));
        executor.setRejectedExecutionHandler(new WaitPolicy());
        threadLocalBulkIngesters = new ThreadLocal<BulkIngester>();
        bulkIngesters = Collections.synchronizedList(Lists.<BulkIngester>newArrayList());
    }
View Full Code Here


    }

    private void startExecutor() {
        executor = new ThreadPoolExecutor(threadCount, threadCount, 10, TimeUnit.SECONDS,
                new ArrayBlockingQueue<Runnable>(250));
        executor.setRejectedExecutionHandler(new WaitPolicy());
    }
View Full Code Here

                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");
                    POOL_FIELD.setAccessible(true);
View Full Code Here

        }
    }

    public void startExecutor() {
        executor = new ThreadPoolExecutor(workers, workers, 10, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(100));
        executor.setRejectedExecutionHandler(new WaitPolicy());
    }
View Full Code Here

        if (maxServerThreads == -1) {
            executorService = Executors.newCachedThreadPool(threadFactory);
            executionHandler = new ExecutionHandler(executorService);
        } else {
            executorService = new ThreadPoolExecutor(maxServerThreads / 3, maxServerThreads,
                    60, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(), threadFactory, new WaitPolicy());
            executionHandler = new ExecutionHandler(executorService);
        }

        //server = new HttpServer(responder, port);
        server = new NettyServer(responder, new InetSocketAddress(port), new NioServerSocketChannelFactory
View Full Code Here

TOP

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

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.