Examples of Worker


Examples of au.csiro.snorocket.core.concurrent.Worker

       
        if(log.isInfoEnabled())
            log.info("Running saturation");
        ExecutorService executor = Executors.newFixedThreadPool(numThreads);
        for (int j = 0; j < numThreads; j++) {
            Runnable worker = new Worker(todo);
            executor.execute(worker);
        }

        executor.shutdown();
        while (!executor.isTerminated()) {
View Full Code Here

Examples of br.com.gmartins.simbler.helpers.Worker

    }

    public Worker getWorker() {
        // SwingWorkers só podem ser executados uma vez.
        // É necessário instanciar um objeto novo toda vez.
        return new Worker(this);
    }
View Full Code Here

Examples of ch.randelshofer.quaqua.util.Worker

            exportFileChooser.setApproveButtonText(labels.getString("filechooser.export"));
        }
        if (JFileChooser.APPROVE_OPTION == exportFileChooser.showSaveDialog(this)) {
            userPrefs.put("courseBuilder.exportedTemplate", exportFileChooser.getSelectedFile().getPath());
            final File target = exportFileChooser.getSelectedFile();
            new Worker() {
                public Object construct() {
                    Object result = null;
                    if (! target.getParentFile().exists()) {
                        target.getParentFile().mkdirs();
                    }
View Full Code Here

Examples of com.amazonaws.services.kinesis.clientlibrary.lib.worker.Worker

        System.out.println("Starting " + applicationName);
        LOG.info("Running " + applicationName + " to process stream " + streamName);


        IRecordProcessorFactory recordProcessorFactory = new SampleRecordProcessorFactory();
         Worker worker = new Worker(recordProcessorFactory, kinesisClientLibConfiguration);

        int exitCode = 0;
        try {
            worker.run();
        } catch (Throwable t) {
            LOG.error("Caught throwable while processing data.", t);
            exitCode = 1;
        }
        System.exit(exitCode);
View Full Code Here

Examples of com.barrybecker4.common.concurrency.Worker

        puzzlePanel_.setShowCandidates(show);
    }

    public void generatePuzzle(final int delay, final int size) {

        Worker worker = new Worker() {

            @Override
            public Object construct() {
                puzzlePanel_.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));

                SudokuGenerator generator = new SudokuGenerator(size, puzzlePanel_);
                generator.setDelay(delay);
                puzzlePanel_.generateNewPuzzle(generator);
                return true;
            }

            @Override
            public void finished() {
                puzzlePanel_.repaint();
                puzzlePanel_.setCursor(Cursor.getDefaultCursor());
            }
        };
        worker.start();
    }
View Full Code Here

Examples of com.barrybecker4.common.concurrency.Worker

        worker.start();
    }

    public void solvePuzzle(final int delay) {

        Worker worker = new Worker() {

            @Override
            public Object construct() {
                SudokuSolver solver = new SudokuSolver();
                solver.setDelay(delay);
                puzzlePanel_.startSolving(solver);
                return true;
            }

            @Override
            public void finished() {
                puzzlePanel_.repaint();
            }
        };
        worker.start();
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.netty.channel.socket.Worker

    @Override
    public ChannelFuture execute(final ChannelPipeline pipeline, final Runnable task) {
        Channel ch = pipeline.getChannel();
        if (ch instanceof AbstractOioChannel) {
            AbstractOioChannel channel = (AbstractOioChannel) ch;
            Worker worker = channel.worker;
            if (worker != null) {
                ChannelRunnableWrapper wrapper = new ChannelRunnableWrapper(pipeline.getChannel(), task);
                channel.worker.executeInIoThread(wrapper);
                return wrapper;
            }
View Full Code Here

Examples of com.ipeirotis.gal.core.Worker

        String assignedLabel = al.getCategoryName();
       
        Map<String, Double> estimatedCorrectLabel = d.getProbabilityVector(ClassificationMethod.DS_Soft);
       
        for (String from: estimatedCorrectLabel.keySet()) {
          Worker w = this.getWorkers().get(workerName);
          Double categoryProbability = estimatedCorrectLabel.get(from);
          Double labelingProbability = w.getConfusionMatrix().getErrorRate(from, assignedLabel);
          if (categoryProbability == 0.0 || Double.isNaN(labelingProbability) || labelingProbability == 0.0 )
            continue;
          else
            result += Math.log(categoryProbability) + Math.log(labelingProbability);
        }
View Full Code Here

Examples of com.sun.tools.javac.comp.Annotate.Worker

     * The method takes the Annotate object as parameter and
     * adds an Annotate.Worker to the correct Annotate queue for
     * later processing.
     */
    public void organizeTypeAnnotationsSignatures(final Env<AttrContext> env, final JCClassDecl tree) {
        annotate.afterRepeated( new Worker() {
            @Override
            public void run() {
                JavaFileObject oldSource = log.useSource(env.toplevel.sourcefile);

                try {
View Full Code Here

Examples of fr.imag.adele.apam.pax.test.grant.impl.Worker

    Implementation impl_toolmanager = waitForImplByName(null, "ToolManager");

    Composite yard = (Composite) ct.createInstance(null, null);
    impl_jackhammer.createInstance(null, null);

    Worker worker1 = (Worker) impl_worker.createInstance(yard, null)
        .getServiceObject();

    apam.waitForIt(Constants.CONST_WAIT_TIME);

    Instance dayinst = null;
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.