<?php

declare(strict_types=1);

namespace Drupal\flowdrop_runtime\Service\Orchestrator;

/**
 * Interface for orchestrators that declare a preferred pipeline storage bundle.
 *
 * Orchestrators implementing this interface control which FlowDropPipeline
 * bundle (and therefore which storage backend) is used for their executions.
 *
 * Orchestrators that do not implement this interface fall back to 'default'
 * (DB-backed DrupalPipelineStorage).
 *
 * @see \Drupal\flowdrop_runtime\Service\Storage\PipelineStorageRegistryInterface
 *
 * @api
 */
interface PipelineAwareOrchestratorInterface {

  /**
   * Returns the preferred FlowDropPipeline bundle for this orchestrator.
   *
   * @return string
   *   The bundle name. Use the constants on PipelineStorageRegistryInterface:
   *   - PipelineStorageRegistryInterface::BUNDLE_DEFAULT — DB-backed storage
   *   - PipelineStorageRegistryInterface::BUNDLE_IN_MEMORY — ephemeral storage
   *
   * @see \Drupal\flowdrop_runtime\Service\Storage\PipelineStorageRegistryInterface::BUNDLE_DEFAULT
   * @see \Drupal\flowdrop_runtime\Service\Storage\PipelineStorageRegistryInterface::BUNDLE_IN_MEMORY
   */
  public function getPreferredPipelineBundle(): string;

}
