/** * Determines whether the {@code task} should reuse the {@link PlatformExecution} of the {@code producer}. * * @param producer whose {@link PlatformExecution} might be reused * @param inputChannel connects the {@code producer} to the {@code task} * @param task might reuse the {@link PlatformExecution} of {@code producer} * @return whether to reuse */ private boolean checkIfShouldReusePlatformExecution(ExecutionTask producer, Channel inputChannel, ExecutionTask task) { final Platform producerPlatform = producer.getPlatform(); return producerPlatform.equals(task.getPlatform()) && producerPlatform.isSinglePlatformExecutionPossible(producer, inputChannel, task); }