<?php
/**
 * LogQueueInterface - Contract for log queue implementations
 *
 * Defines the interface that all log queue implementations must follow.
 * This allows the SDK to remain independent while plugins provide
 * specific implementations (like MySQL-based SqlLogQueue).
 */

namespace CloudXM\SDK\Queue;

interface LogQueueInterface
{
    /**
     * Queue a log payload for later shipping
     */
    public function enqueue(array $payload): bool;

    /**
     * Claim a batch of queued logs for processing
     */
    public function claimBatch(int $limit = 100, int $minId = 0): array;

    /**
     * Delete successfully processed logs
     */
    public function deleteMany(array $ids): bool;

    /**
     * Bump retry attempts for failed logs
     */
    public function bumpAttempts(array $ids): bool;

    /**
     * Get queue statistics
     */
    public function getStats(): array;

    /**
     * Clear all logs from the queue
     */
    public function clearAll(): bool;
}