Package com.asakusafw.yaess.basic.JobExecutor

Examples of com.asakusafw.yaess.basic.JobExecutor.Executing


        }

        private void waitForDone() throws InterruptedException, IOException {
            assert executing.isEmpty() == false;
            monitor.checkCancelled();
            Executing done = doneQueue.take();
            assert done.isDone();
            handleDone(done);
            while (true) {
                monitor.checkCancelled();
                Executing rest = doneQueue.poll();
                if (rest == null) {
                    break;
                }
                assert rest.isDone();
                handleDone(rest);
            }
        }
View Full Code Here


        }

        private void handleDone(Executing done) throws InterruptedException, IOException {
            assert done != null;
            assert done.isDone();
            Executing removed = executing.remove(done.getJob().getId());
            assert removed != null;
            try {
                done.get();
                done(done.getJob());
                monitor.reportJobStatus(done.getJob().getId(), JobStatus.SUCCESS, null);
View Full Code Here

        private boolean submit(Job job) throws InterruptedException, IOException {
            assert job != null;
            monitor.checkCancelled();
            try {
                Executing execution = executor.submit(
                        monitor.createJobMonitor(job.getId(), 1), context, job, doneQueue);
                executing.put(execution.getJob().getId(), execution);
                return true;
            } catch (IOException e) {
                sawError = true;
                handleException(job, e);
                return false;
View Full Code Here

TOP

Related Classes of com.asakusafw.yaess.basic.JobExecutor.Executing

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.