@Test public void testGetReadyOperations() { Collection<String> readyOps = addOperations(2, true, operationConductor.getPendingOperations()); addOperations(3, false, operationConductor.getPendingOperations()); Collection<OperationWrapper> actualReadyOperations = operationConductor.getReadyOperations(); Assert.assertEquals(actualReadyOperations.size(), readyOps.size()); readyOps.forEach(readyOp -> Assert.assertTrue(actualReadyOperations.stream().anyMatch(actualOp -> readyOp.equals(actualOp.getOperation().getName()))) ); }
protected Collection<OperationWrapper> getReadyOperations() { Set<String> completedOperationNames = completedOperations.stream().map(x -> x.getOperation().getName()).collect(Collectors.toSet()); return pendingOperations.stream().filter(opWrapper -> opWrapper.isReady(executorContext, completedOperationNames)).collect(Collectors.toList()); }
OperationConductor implements OnOperationCompleteListener { protected Collection<OperationWrapper> getReadyOperations() { Set<String> completedOperationNames = completedOperations.stream().map(x -> x.getOperation().getName()).collect(Collectors.toSet()); return pendingOperations.stream().filter(opWrapper -> opWrapper.isReady(executorContext, completedOperationNames)).collect(Collectors.toList()); } }
OperationConductor implements OnOperationCompleteListener { protected Collection<OperationWrapper> getReadyOperations() { Set<String> completedOperationNames = completedOperations.stream().map(x -> x.getOperation().getName()).collect(Collectors.toSet()); return pendingOperations.stream().filter(opWrapper -> opWrapper.isReady(executorContext, completedOperationNames)).collect(Collectors.toList()); } OperationConductor(Collection<Operation> operations, ExecutorContext executorContext,
        List<OperationConductorModifier> completedOperationModifiers);  OperationConductor(Collection<Operation> operations, ExecutorContext executorContext); }
OperationConductor implements OnOperationCompleteListener { protected Collection<OperationWrapper> getReadyOperations() { Set<String> completedOperationNames = completedOperations.stream().map(x -> x.getOperation().getName()).collect(Collectors.toSet()); return pendingOperations.stream().filter(opWrapper -> opWrapper.isReady(executorContext, completedOperationNames)).collect(Collectors.toList()); } OperationConductor(Collection<Operation> operations, ExecutorContext executorContext,
        List<OperationConductorModifier> completedOperationModifiers);  OperationConductor(Collection<Operation> operations, ExecutorContext executorContext); void run(); @Override void onComplete(OperationWrapper operationWrapper); List<OperationWrapper> getRunningOperations(); List<OperationWrapper> getPendingOperations(); List<OperationWrapper> getFailedOperations(); JsonContextUpdater getJsonContextUpdater(); List<DiagnosticEvent> retrieveAllDiagnosticEvents(); boolean hasExecutionFailed(); String getFailedOperationsDelimited(String delimiter); void setCompletedOperationModifiers(List<OperationConductorModifier> completedOperationModifiers); }
OperationConductor implements OnOperationCompleteListener { protected Collection<OperationWrapper> getReadyOperations() { Set<String> completedOperationNames = completedOperations.stream().map(x -> x.getOperation().getName()).collect(Collectors.toSet()); return pendingOperations.stream().filter(opWrapper -> opWrapper.isReady(executorContext, completedOperationNames)).collect(Collectors.toList()); } OperationConductor(Collection<Operation> operations, ExecutorContext executorContext,
        List<OperationConductorModifier> completedOperationModifiers);  OperationConductor(Collection<Operation> operations, ExecutorContext executorContext); void run(); @Override void onComplete(OperationWrapper operationWrapper); List<OperationWrapper> getRunningOperations(); List<OperationWrapper> getPendingOperations(); List<OperationWrapper> getFailedOperations(); JsonContextUpdater getJsonContextUpdater(); List<DiagnosticEvent> retrieveAllDiagnosticEvents(); boolean hasExecutionFailed(); String getFailedOperationsDelimited(String delimiter); void setCompletedOperationModifiers(List<OperationConductorModifier> completedOperationModifiers);  }