Examples of WorkUnit


Examples of com.sk89q.skmcl.concurrent.WorkUnit

        }
    }

    @Override
    public LaunchedProcess call() throws LauncherException, InterruptedException {
        WorkUnit step1 = split(0.1),
                step2 = split(0.8),
                step3 = split(0.1);

        // First resolve the version (i.e. latest -> which version is "latest"?)

        setLocalizedTitle(_("launch.launchingTitle", profile.toString()));
        step1.push(0, _("launch.checkingVersion"));

        Instance instance = getInstance();
        Persistence.commitAndForget(profile);

        // Then attempt to launch
View Full Code Here

Examples of com.sk89q.skmcl.concurrent.WorkUnit

        }
    }

    @Override
    public InstallerRuntime call() throws Exception {
        WorkUnit step1 = split(0.9),
                step2 = split(0.1, tasks.size());

        step1.push(0, _("installer.preparingDownload", tasks.size()));

        httpDownloader.addObserver(step1);
        httpDownloader.call();

        for (Runnable task : tasks) {
View Full Code Here

Examples of com.sk89q.skmcl.concurrent.WorkUnit

            } catch (InterruptedException e) {
                executor.shutdownNow();
                throw new InterruptedException();
            }

            WorkUnit parts = split(1, executed.size());

            // Run through all the jobs to see whether any failed
            synchronized (executed) {
                for (Future<RemoteFile> future : executed) {
                    RemoteFile file = future.get();
View Full Code Here

Examples of com.sk89q.skmcl.concurrent.WorkUnit

    }

    @Override
    public MinecraftInstall call() throws Exception {
        try {
            WorkUnit step1 = split(0.02),
                    step2 = split(0.02),
                    step3 = split(0.96);

            if (!hasSystemProperty(MinecraftUpdater.class, "skipAssets")) {
                installAssets(step1);
View Full Code Here

Examples of hudson.model.queue.WorkUnit

        return work;
    }

    @Override
    protected WorkUnit grabJob() throws InterruptedException {
        WorkUnit r = super.grabJob();
        assert r==work;
        work = null;
        return r;
    }
View Full Code Here

Examples of hudson.model.queue.WorkUnit

    public synchronized WorkUnit pop() throws InterruptedException {
        final Executor exec = Executor.currentExecutor();

        if (exec instanceof OneOffExecutor) {
            OneOffExecutor ooe = (OneOffExecutor) exec;
            final WorkUnit wu = ooe.getAssignedWorkUnit();
            pendings.remove(wu.context.item);
            return wu;
        }

        try {
View Full Code Here

Examples of hudson.model.queue.WorkUnit

    }


    @Override
    protected WorkUnit grabJob() throws InterruptedException {
        WorkUnit r = super.grabJob();
        assert r==work;
        work = null;
        return r;
    }
View Full Code Here

Examples of hudson.model.queue.WorkUnit

    public synchronized WorkUnit pop() throws InterruptedException {
        final Executor exec = Executor.currentExecutor();

        if (exec instanceof OneOffExecutor) {
            OneOffExecutor ooe = (OneOffExecutor) exec;
            final WorkUnit wu = ooe.getWorkUnit();
            pendings.remove(wu.context.item);
            return wu;
        }

        try {
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.