Examples of TaskManager


Examples of net.sourceforge.ganttproject.task.TaskManager

        assertEquals("Unexpected set of resources assigned to task=" + task,
                expectedResources, actualResources);
    }

    public void testResourceIsNotAssignedTwice() {
        TaskManager taskManager = getTaskManager();
        Task task = taskManager.createTask();
        ProjectResource res1 = getResourceManager().getById(1);
        task.getAssignmentCollection().addAssignment(res1);
        task.getAssignmentCollection().addAssignment(res1);
        Set actualResources = extractResources(task);
        Set expectedResources = new HashSet(Arrays
View Full Code Here

Examples of net.sourceforge.ganttproject.task.TaskManager

                expectedResources, actualResources);
    }


    public void testAssignmentsDisappearOnTaskDeletion() {
        TaskManager taskManager = getTaskManager();
        Task task = taskManager.createTask();
        ProjectResource res1 = getResourceManager().getById(1);
        task.getAssignmentCollection().addAssignment(res1);
        task.delete();
        ResourceAssignment[] assignments = res1.getAssignments();
        assertTrue(
View Full Code Here

Examples of net.sourceforge.ganttproject.task.TaskManager

                "Resource is expected to have no assignments after task deletion",
                assignments.length == 0);
    }

    public void testAssignmentDisappearOnResourceDeletion() {
        TaskManager taskManager = getTaskManager();
        Task task = taskManager.createTask();
        taskManager.registerTask(task);
        ProjectResource res1 = getResourceManager().getById(1);
        task.getAssignmentCollection().addAssignment(res1);
        res1.delete();
        Set resources = extractResources(task);
        assertTrue("It is expecte that after resource deletion assignments disappear", resources.isEmpty());
View Full Code Here

Examples of net.sourceforge.ganttproject.task.TaskManager

        void enter() throws IOException {
            GPParser opener = myParserFactory.newParser();
            ResourceManager hrManager = getHumanResourceManager();
            RoleManager roleManager = getRoleManager();
            TaskManager taskManager = getTaskManager();
            ResourceTagHandler resourceHandler = new ResourceTagHandler(
                    hrManager, roleManager, myProject.getResourceCustomPropertyManager());
            DependencyTagHandler dependencyHandler = new DependencyTagHandler(
                    opener.getContext(), taskManager, getUIFacade());
            AllocationTagHandler allocationHandler = new AllocationTagHandler(
View Full Code Here

Examples of org.apache.flink.runtime.taskmanager.TaskManager

     
      final JobGraph jobGraph = new JobGraph("Pointwise Job", sender, receiver);
     
      final JobManager jm = startJobManager(2, NUM_TASKS / 2);
     
      final TaskManager tm1 = ((LocalInstanceManager) jm.getInstanceManager()).getTaskManagers()[0];
      final TaskManager tm2 = ((LocalInstanceManager) jm.getInstanceManager()).getTaskManagers()[1];
     
      final GlobalBufferPool bp1 = tm1.getChannelManager().getGlobalBufferPool();
      final GlobalBufferPool bp2 = tm2.getChannelManager().getGlobalBufferPool();
     
      try {
        JobSubmissionResult result = jm.submitJob(jobGraph);

        if (result.getReturnCode() != AbstractJobResult.ReturnCode.SUCCESS) {
          System.out.println(result.getDescription());
        }
        assertEquals(AbstractJobResult.ReturnCode.SUCCESS, result.getReturnCode());
       
        ExecutionGraph eg = jm.getCurrentJobs().get(jobGraph.getJobID());
       
        // wait until everyone has settled in
        long deadline = System.currentTimeMillis() + 2000;
        while (System.currentTimeMillis() < deadline) {
         
          boolean allrunning = true;
          for (ExecutionVertex v : eg.getJobVertex(receiver.getID()).getTaskVertices()) {
            if (v.getCurrentExecutionAttempt().getState() != ExecutionState.RUNNING) {
              allrunning = false;
              break;
            }
          }
         
          if (allrunning) {
            break;
          }
          Thread.sleep(200);
        }
       
        // kill one task manager
        TaskManager tm = ((LocalInstanceManager) jm.getInstanceManager()).getTaskManagers()[0];
        tm.shutdown();
       
        eg.waitForJobEnd();
       
        // make sure that in any case, the network buffers are all returned
        waitForTaskThreadsToBeTerminated();
View Full Code Here

Examples of org.apache.lenya.cms.task.TaskManager

        String contextPath = map.get(Task.PARAMETER_SERVLET_CONTEXT);
        String publicationId = map.get(Task.PARAMETER_PUBLICATION_ID);
       
        Publication publication = new Publication(publicationId, contextPath);
        TaskManager manager = new TaskManager(publication.getDirectory().getAbsolutePath());
        Task task = manager.getTask(taskId);

        try {
            task.parameterize(map.getParameters());
            task.execute(contextPath);
        }
View Full Code Here

Examples of org.apache.s4.comm.core.TaskManager

    }

    private static void testStaticTaskManager(String[] args) {
        String address = null;
        address = "localhost:2181";
        TaskManager taskManager = new StaticTaskManager(address,
                                                        "taskmanagerTest",
                                                        ClusterType.S4,
                                                        null);
        Map<String, String> customTaskData = new HashMap<String, String>();
        Object acquireTask = taskManager.acquireTask(customTaskData);
        System.out.println("Acuired Task:" + acquireTask);

    }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.persistence.entity.TaskManager

    if(processInstanceId == null && processDefinitionId == null && processDefinitionKey == null) {
      throw new ProcessEngineException("ProcessInstanceId, ProcessDefinitionId nor ProcessDefinitionKey cannot be null.");
    }

    ExecutionManager executionManager = commandContext.getExecutionManager();
    TaskManager taskManager = commandContext.getTaskManager();

    SuspensionState suspensionState = getNewSuspensionState();

    if (processInstanceId != null) {
      executionManager.updateExecutionSuspensionStateByProcessInstanceId(processInstanceId, suspensionState);
      taskManager.updateTaskSuspensionStateByProcessInstanceId(processInstanceId, suspensionState);
    } else

    if (processDefinitionId != null) {
      executionManager.updateExecutionSuspensionStateByProcessDefinitionId(processDefinitionId, suspensionState);
      taskManager.updateTaskSuspensionStateByProcessDefinitionId(processDefinitionId, suspensionState);
    } else

    if (processDefinitionKey != null) {
      executionManager.updateExecutionSuspensionStateByProcessDefinitionKey(processDefinitionKey, suspensionState);
      taskManager.updateTaskSuspensionStateByProcessDefinitionKey(processDefinitionKey, suspensionState);
    }

    getSetJobStateCmd().execute(commandContext);

    PropertyChange propertyChange = new PropertyChange(SUSPENSION_STATE_PROPERTY, null, suspensionState.getName());
View Full Code Here

Examples of org.cytoscape.work.TaskManager

*/   
    CyApplicationManager appMgr = (CyApplicationManager)getService(bc, org.cytoscape.application.CyApplicationManager.class);
    CyNetworkViewManager netViewMgr = (CyNetworkViewManager)getService(bc, org.cytoscape.view.model.CyNetworkViewManager.class);
    CyNetworkManager netMgr = (CyNetworkManager)getService(bc, org.cytoscape.model.CyNetworkManager.class);
    TaskManager taskMgr = (TaskManager)getService(bc, org.cytoscape.work.TaskManager.class);
    CyNetworkViewFactory netViewFactory = (CyNetworkViewFactory)getService(bc, org.cytoscape.view.model.CyNetworkViewFactory.class);
    CyRootNetworkManager rootNetworkMgr = (CyRootNetworkManager)getService(bc, org.cytoscape.model.subnetwork.CyRootNetworkManager.class);
    CySwingApplication swingApp = (CySwingApplication)getService(bc, org.cytoscape.application.swing.CySwingApplication.class);
    RenderingEngineFactory dingRenderingEngineFactory = (RenderingEngineFactory)getService(bc, org.cytoscape.view.presentation.RenderingEngineFactory.class, "(id=ding)");
    CyServiceRegistrar serviceRegistrar = (CyServiceRegistrar)getService(bc, org.cytoscape.service.util.CyServiceRegistrar.class);
View Full Code Here

Examples of org.jboss.errai.bus.client.api.TaskManager

    config.getResourceProviders().put(RequestDispatcher.class.getName(),
        new DispatcherProvider(context.getService().getDispatcher()));

    // configure the server-side taskmanager

    final TaskManager taskManager = resolveTaskManager(config);

    TaskManagerFactory.setTaskManagerProvider(new TaskManagerProvider() {
      public TaskManager get() {
        return taskManager;
      }
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.