<?php

declare(strict_types=1);

namespace App\Framework\Cache\Warming;

use App\Framework\Cache\Warming\ValueObjects\WarmupResult;

/**
 * Interface for cache warming strategies
 *
 * Strategies determine which cache entries to warm up and in what order.
 */
interface WarmupStrategy
{
    /**
     * Get the strategy name for identification
     */
    public function getName(): string;

    /**
     * Get the priority of this strategy (higher = executed first)
     */
    public function getPriority(): int;

    /**
     * Execute the warmup strategy
     *
     * @return WarmupResult Result of the warmup operation
     */
    public function warmup(): WarmupResult;

    /**
     * Check if this strategy should run based on current conditions
     */
    public function shouldRun(): bool;

    /**
     * Get estimated time to complete warmup in seconds
     */
    public function getEstimatedDuration(): int;
}
