test_class.file: modules/tensorflow/src/test/java/org/apache/ignite/tensorflow/core/longrunning/LongRunningProcessManagerTest.java
test_class.identifier: LongRunningProcessManagerTest
test_case.body: @Test
      @SuppressWarnings("unchecked")
      public void testStart() {
          UUID nodeId = UUID.randomUUID();
          UUID procId = UUID.randomUUID();
  
          Ignite ignite = mock(Ignite.class);
          IgniteCluster cluster = mock(IgniteCluster.class);
          ClusterGroup clusterGrp = mock(ClusterGroup.class);
          IgniteCompute igniteCompute = mock(IgniteCompute.class);
          doReturn(cluster).when(ignite).cluster();
          doReturn(igniteCompute).when(ignite).compute(eq(clusterGrp));
          doReturn(clusterGrp).when(cluster).forNodeId(eq(nodeId));
          doReturn(Collections.singletonList(procId)).when(igniteCompute).call(any(IgniteCallable.class));
  
          List<LongRunningProcess> list = Collections.singletonList(new LongRunningProcess(nodeId, () -> {}));
  
          LongRunningProcessManager mgr = new LongRunningProcessManager(ignite);
          Map<UUID, List<UUID>> res = mgr.start(list);
  
          assertEquals(1, res.size());
          assertTrue(res.containsKey(nodeId));
          assertEquals(procId, res.get(nodeId).iterator().next());
  
          verify(igniteCompute).call(any(LongRunningProcessStartTask.class));
      }
test_case.class_method_signature: LongRunningProcessManagerTest.testStart()
test_case.full_signature: @Test @SuppressWarnings("unchecked") public void testStart()
test_case.identifier: testStart
test_case.invocations: randomUUID randomUUID mock mock mock mock cluster when doReturn compute when doReturn eq forNodeId when doReturn eq call when doReturn singletonList any singletonList start assertEquals size assertTrue containsKey assertEquals next iterator get call verify any
test_case.modifiers: @Test @SuppressWarnings("unchecked") public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testStart()
focal_class.declarator: ignite
focal_class.modifier: private final
focal_class.original_string: private final Ignite ignite;
focal_class.type: Ignite
focal_class.var_name: ignite
focal_class.file: modules/tensorflow/src/main/java/org/apache/ignite/tensorflow/core/longrunning/LongRunningProcessManager.java
focal_class.identifier: LongRunningProcessManager
focal_class.interfaces: implements ProcessManager<LongRunningProcess>
focal_class.class_method_signature: LongRunningProcessManager.LongRunningProcessManager(Ignite ignite)
focal_class.full_signature: public  LongRunningProcessManager(Ignite ignite)
focal_class.identifier: LongRunningProcessManager
focal_class.modifiers: public
focal_class.parameters: (Ignite ignite)
focal_class.signature:  LongRunningProcessManager(Ignite ignite)
focal_class.class_method_signature: LongRunningProcessManager.start(List<LongRunningProcess> specifications)
focal_class.full_signature: @Override public Map<UUID, List<UUID>> start(List<LongRunningProcess> specifications)
focal_class.identifier: start
focal_class.modifiers: @Override public
focal_class.parameters: (List<LongRunningProcess> specifications)
focal_class.return: Map<UUID, List<UUID>>
focal_class.signature: Map<UUID, List<UUID>> start(List<LongRunningProcess> specifications)
focal_class.class_method_signature: LongRunningProcessManager.ping(Map<UUID, List<UUID>> procIds)
focal_class.full_signature: @Override public Map<UUID, List<LongRunningProcessStatus>> ping(Map<UUID, List<UUID>> procIds)
focal_class.identifier: ping
focal_class.modifiers: @Override public
focal_class.parameters: (Map<UUID, List<UUID>> procIds)
focal_class.return: Map<UUID, List<LongRunningProcessStatus>>
focal_class.signature: Map<UUID, List<LongRunningProcessStatus>> ping(Map<UUID, List<UUID>> procIds)
focal_class.class_method_signature: LongRunningProcessManager.stop(Map<UUID, List<UUID>> procIds, boolean clear)
focal_class.full_signature: @Override public Map<UUID, List<LongRunningProcessStatus>> stop(Map<UUID, List<UUID>> procIds, boolean clear)
focal_class.identifier: stop
focal_class.modifiers: @Override public
focal_class.parameters: (Map<UUID, List<UUID>> procIds, boolean clear)
focal_class.return: Map<UUID, List<LongRunningProcessStatus>>
focal_class.signature: Map<UUID, List<LongRunningProcessStatus>> stop(Map<UUID, List<UUID>> procIds, boolean clear)
focal_class.class_method_signature: LongRunningProcessManager.clear(Map<UUID, List<UUID>> procIds)
focal_class.full_signature: @Override public Map<UUID, List<LongRunningProcessStatus>> clear(Map<UUID, List<UUID>> procIds)
focal_class.identifier: clear
focal_class.modifiers: @Override public
focal_class.parameters: (Map<UUID, List<UUID>> procIds)
focal_class.return: Map<UUID, List<LongRunningProcessStatus>>
focal_class.signature: Map<UUID, List<LongRunningProcessStatus>> clear(Map<UUID, List<UUID>> procIds)
focal_class.class_method_signature: LongRunningProcessManager.call(Map<UUID, List<T>> params,
          Function<List<T>, LongRunningProcessTask<List<E>>> taskSupplier, Consumer<Map<UUID, List<E>>> rollback,
          boolean onlyIfNodeExists)
focal_class.full_signature: private Map<UUID, List<E>> call(Map<UUID, List<T>> params,
          Function<List<T>, LongRunningProcessTask<List<E>>> taskSupplier, Consumer<Map<UUID, List<E>>> rollback,
          boolean onlyIfNodeExists)
focal_class.identifier: call
focal_class.modifiers: private
focal_class.parameters: (Map<UUID, List<T>> params,
          Function<List<T>, LongRunningProcessTask<List<E>>> taskSupplier, Consumer<Map<UUID, List<E>>> rollback,
          boolean onlyIfNodeExists)
focal_class.return: Map<UUID, List<E>>
focal_class.signature: Map<UUID, List<E>> call(Map<UUID, List<T>> params,
          Function<List<T>, LongRunningProcessTask<List<E>>> taskSupplier, Consumer<Map<UUID, List<E>>> rollback,
          boolean onlyIfNodeExists)
focal_class.class_method_signature: LongRunningProcessManager.groupByNodeId(List<LongRunningProcess> specifications)
focal_class.full_signature: private Map<UUID, List<LongRunningProcess>> groupByNodeId(List<LongRunningProcess> specifications)
focal_class.identifier: groupByNodeId
focal_class.modifiers: private
focal_class.parameters: (List<LongRunningProcess> specifications)
focal_class.return: Map<UUID, List<LongRunningProcess>>
focal_class.signature: Map<UUID, List<LongRunningProcess>> groupByNodeId(List<LongRunningProcess> specifications)
focal_class.class_method_signature: LongRunningProcessManager.rollbackStartTask(Map<UUID, List<UUID>> procIds)
focal_class.full_signature: private void rollbackStartTask(Map<UUID, List<UUID>> procIds)
focal_class.identifier: rollbackStartTask
focal_class.modifiers: private
focal_class.parameters: (Map<UUID, List<UUID>> procIds)
focal_class.return: void
focal_class.signature: void rollbackStartTask(Map<UUID, List<UUID>> procIds)
focal_class.class_method_signature: LongRunningProcessManager.rollbackNothing(Map<UUID, List<LongRunningProcessStatus>> processes)
focal_class.full_signature: private void rollbackNothing(Map<UUID, List<LongRunningProcessStatus>> processes)
focal_class.identifier: rollbackNothing
focal_class.modifiers: private
focal_class.parameters: (Map<UUID, List<LongRunningProcessStatus>> processes)
focal_class.return: void
focal_class.signature: void rollbackNothing(Map<UUID, List<LongRunningProcessStatus>> processes)
focal_method.body: @Override public Map<UUID, List<UUID>> start(List<LongRunningProcess> specifications) {
          return call(groupByNodeId(specifications), LongRunningProcessStartTask::new, this::rollbackStartTask, false);
      }
focal_method.class_method_signature: LongRunningProcessManager.start(List<LongRunningProcess> specifications)
focal_method.full_signature: @Override public Map<UUID, List<UUID>> start(List<LongRunningProcess> specifications)
focal_method.identifier: start
focal_method.invocations: call groupByNodeId
focal_method.modifiers: @Override public
focal_method.parameters: (List<LongRunningProcess> specifications)
focal_method.return: Map<UUID, List<UUID>>
focal_method.signature: Map<UUID, List<UUID>> start(List<LongRunningProcess> specifications)