Package kr.or.ioi2002.RMIClientBean

Examples of kr.or.ioi2002.RMIClientBean.HttpPostFileParser$MultipartInputStreamHandler


        dispatchJob();
    }

    public void submit(String contestId, String userId, Task task, String language, File tmp,
            String sourceFileName, JobRemovalNotified notified, boolean isAlwaysAccept) {
        Job job = new Job();
        job.setContestId(contestId);
        job.setUserid(userId);
        job.setType(JobType.SUBMIT);
        job.setTask(task.getName());
        job.setAlwaysAccept(isAlwaysAccept || (task.getType() == Task.PROBLEM_TYPE_OUTPUT));
        if (task.getType() == Task.PROBLEM_TYPE_OUTPUT) {
            job.setTestIndex(language);
            job.setLanguage("N/A");
        } else {
            job.setLanguage(language);
        }
        job.srcFilename = sourceFileName;
        job.src = tmp;
        gradingQueueManager.push(job, notified);
        dispatchJob();
View Full Code Here


        dispatchJob();
    }

    public void test(String contestId, String userId, String task, String language, TempFile tmp,
            TempFile tmp2, JobRemovalNotified notified) {
        Job job = new Job();
        job.setContestId(contestId);
        job.setUserid(userId);
        job.setType(JobType.TEST);
        job.setTask(task);
        job.setLanguage(language);
        job.src = tmp;
        job.stdin = tmp2;
        gradingQueueManager.push(job, notified);
        dispatchJob();
    }
View Full Code Here

        }
        GraderAgent gm = machineQueueManager.moveMachineToBusy();
        if (gm == null) {
            return;
        }
        Job job = gradingQueueManager.popJob(jobType);

        if (gm != null && job != null && gm.assignJob(job)) {
            gradingQueueManager.markSuccessfullyAssignedJob(job);
        } else {
            machineQueueManager.releaseMachineFromBusyMode(gm);
View Full Code Here

    }

    public void pushTestData(Contest contest) {
        int jobsCount = machineQueueManager.markAllGradersToUpdate(contest);
        for (int i = 0; i < jobsCount; ++i) {
            Job job = new Job();
            job.setContestId(contest.getId());
            job.setType(JobType.SETUP);
            gradingQueueManager.push(job, null);
            dispatchJob();
        }
    }
View Full Code Here

    public Job removeJob(JobType jobType) {
        LinkedList<Job> queue = getQueueImpl(jobType);
        synchronized (queue) {
            if (queue.isEmpty())
                return null;
            Job job = queue.remove();
            store();
            return job;
        }
    }
View Full Code Here

        LogGraderAgent.log("dispatchGrade: putback occured");
        push(job, null);
    }

    public synchronized void push(Job job, JobRemovalNotified notified) {
        Job modifiedJob = implementation.addJob(job);
        notifyAddition(notified, modifiedJob);
    }
View Full Code Here

        Job modifiedJob = implementation.addJob(job);
        notifyAddition(notified, modifiedJob);
    }

    public synchronized Job popJob(JobType jobType) {
        Job job = implementation.removeJob(jobType);
        if (job == null)
            return null;

        notifyRemoval(job);
        return job;
View Full Code Here

    public boolean gradeAfterSubmit(String contestId, String userId, String task, String language) {
        File srcfile = mediator.getSourceCode(contestId, userId, task);
        if (srcfile == null)
            return false;

        Job job = new Job();
        job.setContestId(contestId);
        job.setUserid(userId);
        job.setType(JobType.GRADE);
        job.setTask(task);
        job.setLanguage(language);
        job.setNotGradeFeedback(true);
        job.src = srcfile;
        gradingQueueManager.push(job, null);
        LogGrade.log(userId + ",START-lean");
        dispatchJob();
        return true;
View Full Code Here

        job.setTask(task.getName());
        return true;
    }

    public void grade(String contestId, String userid, String task, String language, File tmp) {
        Job job = new Job();
        job.setContestId(contestId);
        job.setUserid(userid);
        job.setType(JobType.GRADE);
        job.setTask(task);
        job.setLanguage(language);
        handleOuputOnlyTask(job);
        job.src = tmp;
        gradingQueueManager.push(job, null);
        dispatchJob();
    }
View Full Code Here

        LogGrade.log(userId + ",START");
        return true;
    }

    public void grade(String contestId, String userid, String task, String language, File tmp) {
        Job job = new Job();
        job.setContestId(contestId);
        job.setUserid(userid);
        job.setType(JobType.GRADE);
        job.setTask(task);
        job.setLanguage(language);
        job.src = tmp;
        gradingQueueManager.push(job, null);
        dispatchJob();
    }
View Full Code Here

TOP

Related Classes of kr.or.ioi2002.RMIClientBean.HttpPostFileParser$MultipartInputStreamHandler

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.