Examples of cancelTask()


Examples of org.apache.helix.messaging.handling.HelixTaskExecutor.cancelTask()

    }
    executor.onMessage("someInstance", msgList, changeContext);
    Thread.sleep(500);
    for(int i = 0; i < nMsgs2; i++)
    {
      executor.cancelTask(msgListToCancel.get(i), changeContext);
    }
    Thread.sleep(1500);

    AssertJUnit.assertTrue(factory._processedMsgIds.size() == nMsgs1);
    AssertJUnit.assertTrue(factory._handlersCreated == nMsgs1 + nMsgs2);
View Full Code Here

Examples of org.apache.helix.messaging.handling.HelixTaskExecutor.cancelTask()

    executor.onMessage("someInstance", msgList, changeContext);
    Thread.sleep(500);
    for (int i = 0; i < nMsgs2; i++) {
      // executor.cancelTask(msgListToCancel.get(i), changeContext);
      HelixTask task = new HelixTask(msgListToCancel.get(i), changeContext, null, null);
      executor.cancelTask(task);
    }
    Thread.sleep(1500);

    AssertJUnit.assertTrue(factory._processedMsgIds.size() == nMsgs1);
    AssertJUnit.assertTrue(factory._handlersCreated == nMsgs1 + nMsgs2);
View Full Code Here

Examples of org.apache.helix.messaging.handling.HelixTaskExecutor.cancelTask()

    Thread.sleep(500);
    for(int i = 0; i < nMsgs2; i++)
    {
      // executor.cancelTask(msgListToCancel.get(i), changeContext);
      HelixTask task = new HelixTask(msgListToCancel.get(i), changeContext, null, null);
      executor.cancelTask(task);
    }
    Thread.sleep(1500);

    AssertJUnit.assertTrue(factory._processedMsgIds.size() == nMsgs1);
    AssertJUnit.assertTrue(factory._handlersCreated == nMsgs1 + nMsgs2);
View Full Code Here

Examples of org.bukkit.scheduler.BukkitScheduler.cancelTask()

        BukkitScheduler sched = getServer().getScheduler();

        // Stop data-man task.
        if (dataManTaskId != -1){
            sched.cancelTask(dataManTaskId);
            dataManTaskId = -1;
        }

        // Stop the tickTask.
        if (verbose) {
View Full Code Here

Examples of org.bukkit.scheduler.BukkitScheduler.cancelTask()

        TickTask.removeAllTickListeners();
        // (Keep the tick task locked!)

        // Stop consistency checking task.
        if (consistencyCheckerTaskId != -1){
            sched.cancelTask(consistencyCheckerTaskId);
            consistencyCheckerTaskId = -1;
        }

        // Just to be sure nothing gets left out.
        if (verbose) {
View Full Code Here

Examples of org.bukkit.scheduler.BukkitScheduler.cancelTask()

    }

    protected void scheduleConsistencyCheckers(){
        BukkitScheduler sched = getServer().getScheduler();
        if (consistencyCheckerTaskId != -1){
            sched.cancelTask(consistencyCheckerTaskId);
        }
        ConfigFile config = ConfigManager.getConfigFile();
        if (!config.getBoolean(ConfPaths.DATA_CONSISTENCYCHECKS_CHECK, true)) return;
        // Schedule task in seconds.
        final long delay = 20L * config.getInt(ConfPaths.DATA_CONSISTENCYCHECKS_INTERVAL, 1, 3600, 10);
View Full Code Here

Examples of org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor.cancelTask()

            TaskQueueExecutor executor =
                (TaskQueueExecutor) container.lookup( TaskQueueExecutor.class, "prepare-build-project" );
            Task task = executor.getCurrentTask();
            if ( task != null )
            {
                executor.cancelTask( task );
            }
        }
        catch ( ComponentLookupException e )
        {
            throw new BuildManagerException( "Error looking up prepare-build-queue.", e );
View Full Code Here

Examples of org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor.cancelTask()

        {
            TaskQueueExecutor executor = ( TaskQueueExecutor ) container.lookup( TaskQueueExecutor.class, "prepare-build-project" );
            Task task = executor.getCurrentTask();           
            if( task != null )
            {
                executor.cancelTask( task );
            }
        }
        catch ( ComponentLookupException e )
        {
            throw new BuildManagerException( "Error looking up prepare-build-queue.", e );
View Full Code Here

Examples of org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor.cancelTask()

            TaskQueueExecutor executor =
                (TaskQueueExecutor) container.lookup( TaskQueueExecutor.class, "prepare-build-project" );
            Task task = executor.getCurrentTask();
            if ( task != null )
            {
                executor.cancelTask( task );
            }
        }
        catch ( ComponentLookupException e )
        {
            throw new BuildManagerException( "Error looking up prepare-build-queue.", e );
View Full Code Here

Examples of org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor.cancelTask()

            TaskQueueExecutor executor =
                (TaskQueueExecutor) container.lookup( TaskQueueExecutor.class, "prepare-build-project" );
            Task task = executor.getCurrentTask();
            if ( task != null )
            {
                executor.cancelTask( task );
            }
        }
        catch ( ComponentLookupException e )
        {
            throw new BuildManagerException( "Error looking up prepare-build-queue.", e );
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.