Examples of RejectedExecutionException


Examples of java.util.concurrent.RejectedExecutionException

        public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) throws RejectedExecutionException {
            try {
                executor.getQueue().put(r);
            }
            catch (InterruptedException e) {
                throw new RejectedExecutionException(e);
            }
        }
View Full Code Here

Examples of java.util.concurrent.RejectedExecutionException

       */
      final ForkJoinTask<?>[] growArray() {
         ForkJoinTask<?>[] oldA = array;
         int size = oldA != null ? oldA.length << 1 : INITIAL_QUEUE_CAPACITY;
         if (size > MAXIMUM_QUEUE_CAPACITY)
            throw new RejectedExecutionException("Queue capacity exceeded");
         int oldMask, t, b;
         ForkJoinTask<?>[] a = array = new ForkJoinTask<?>[size];
         if (oldA != null && (oldMask = oldA.length - 1) >= 0 &&
               (t = top) - (b = base) > 0) {
            int mask = size - 1;
View Full Code Here

Examples of java.util.concurrent.RejectedExecutionException

        ExecutorService service = delegate.get();
        if (service != null) {
            service.execute(taskManager.trackTask(command));
            return;
        }
        throw new RejectedExecutionException(
                "Execution service is terminated. No more tasks can be executed.");
    }
View Full Code Here

Examples of java.util.concurrent.RejectedExecutionException

        ExecutorService service = delegate.get();
        if (service != null) {
            return service.invokeAll(taskManager.trackTasks(tasks), timeout,
                    unit);
        }
        throw new RejectedExecutionException(
                "Execution service is terminated. No more tasks can be executed.");
    }
View Full Code Here

Examples of java.util.concurrent.RejectedExecutionException

            throws InterruptedException {
        ExecutorService service = delegate.get();
        if (service != null) {
            return service.invokeAll(taskManager.trackTasks(tasks));
        }
        throw new RejectedExecutionException(
                "Execution service is terminated. No more tasks can be executed.");
    }
View Full Code Here

Examples of java.util.concurrent.RejectedExecutionException

        if (service != null) {
            // since the tasks are either executed or cancelled, there is no
            // need to track them
            return service.invokeAny(tasks, timeout, unit);
        }
        throw new RejectedExecutionException(
                "Execution service is terminated. No more tasks can be executed.");
    }
View Full Code Here

Examples of java.util.concurrent.RejectedExecutionException

        if (service != null) {
            // since the tasks are either executed or cancelled, there is no
            // need to track them
            return service.invokeAny(tasks);
        }
        throw new RejectedExecutionException(
                "Execution service is terminated. No more tasks can be executed.");
    }
View Full Code Here

Examples of java.util.concurrent.RejectedExecutionException

    public <T> Future<T> submit(Callable<T> task) {
        ExecutorService service = delegate.get();
        if (service != null) {
            return service.submit(taskManager.trackTask(task));
        }
        throw new RejectedExecutionException(
                "Execution service is terminated. No more tasks can be executed.");
    }
View Full Code Here

Examples of java.util.concurrent.RejectedExecutionException

    public <T> Future<T> submit(Runnable task, T result) {
        ExecutorService service = delegate.get();
        if (service != null) {
            return service.submit(taskManager.trackTask(task), result);
        }
        throw new RejectedExecutionException(
                "Execution service is terminated. No more tasks can be executed.");
    }
View Full Code Here

Examples of java.util.concurrent.RejectedExecutionException

    public Future<?> submit(Runnable task) {
        ExecutorService service = delegate.get();
        if (service != null) {
            return service.submit(taskManager.trackTask(task));
        }
        throw new RejectedExecutionException(
                "Execution service is terminated. No more tasks can be executed.");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.