$tableOptions Retained for compatibility; never enables a foreground query. * @return array */ public function getRedirectStatusCounts($bypassCache = false, array $tableOptions = array()): array; /** * Same counts as getRedirectStatusCounts(), plus the freshness state that * produced them, so a caller can tell "never computed on this site" apart * from "computed and genuinely zero". The flat accessor above collapses * both onto an absent key / a zero. * * State is one of ABJ_404_Solution_StatusCountsRefreshCoordinator::STATE_*. * * @return array{counts: array, state: string} */ public function getRedirectStatusCountsResult(): array; /** * @return array */ public function getRedirectHitCountHistogram(): array; /** * @param bool $bypassCache Retained for compatibility; foreground reads are always cache-only. * @param array $tableOptions Retained for compatibility; never enables a foreground query. * @return array */ public function getCapturedStatusCounts($bypassCache = false, array $tableOptions = array()): array; /** * Captured-404 counts plus their freshness state. See * getRedirectStatusCountsResult(). * * @return array{counts: array, state: string} */ public function getCapturedStatusCountsResult(): array; /** @return int|null Null until the background count has been computed. */ public function getHighImpactCapturedCount(): ?int; /** @return string */ public function buildHighImpactCapturedCountQuery(): string; /** * @template T * @param callable():T $work * @return T */ public function runWithDeferredInvalidation(callable $work); /** @return void */ public function invalidateStatusCountsCache(): void; /** @return void */ public function invalidateViewSnapshotCache(): void; /** @return void */ public function clearRegexRedirectsCache(): void; /* ---- redirect-list reads (admin tables / export) ---- */ /** * @param int $logID * @return int */ public function getLogsCount($logID); /** @param string $tempFile @return void */ public function doRedirectsExport(string $tempFile): void; /** @return iterable> */ public function getRedirectsWithRegEx(); /** @return array> */ public function getManualRedirectsWithRegexMetachars(); /** * @param string $sub * @param array $tableOptions * @return array */ public function getRedirectsForView($sub, $tableOptions); /** * Whether the most recent getRedirectsForView() result is NOT a trustworthy * "genuinely empty" listing (pending build, errored read, or an empty * snapshot contradicting the live source count). * * @return bool */ public function lastRedirectsViewReadWasIncomplete(): bool; /** * @param string $sub * @param array $tableOptions * @return int Negative when the count query was incomplete or unavailable. */ public function getRedirectsForViewCount(string $sub, array $tableOptions): int; /** * Whether ordering the admin list by $orderby can be served index-ordered now * (a narrow sort-key-backed sort whose column exists and whose backfill latch * is set; non-key-backed sorts are always ready). The admin header uses this * to disable the URL / Destination sort links on the captured tab during the * post-upgrade backfill window. * * @param string $orderby UI orderby alias (url, final_dest, logshits, ...). * @return bool */ public function isSortReadyForOrderby(string $orderby): bool; /** * Readiness status for ordering the admin list by $orderby. Sort-key-backed * URL / Destination sorts can be ready, temporarily pending a backfill, or * structurally unavailable because the backing column/index schema is absent. * Non-key-backed sorts are always ready. * * @param string $orderby UI orderby alias (url, final_dest, logshits, ...). * @return string One of the SORT_READINESS_* constants. */ public function sortReadinessStatusForOrderby(string $orderby): string; /** * Backfill progress (0..100) for $orderby's narrow sort key, for the admin * "building the index" tooltip. Cheap: cursor wp_options read over an O(1) * MAX(id) probe, never a COUNT over the captured rows. * * @param string $orderby UI orderby alias. * @return int */ public function sortBackfillPercentForOrderby(string $orderby): int; /** * @param array $postIDs * @return array */ public function getExtraDataToPermalinkSuggestions(array $postIDs): array; /* ---- schema / capacity introspection + failure diagnostics ---- */ /** @return array */ public function getTableEngines(); /** @return bool */ public function isMyISAMSupported(): bool; /** @return int */ public function getCapturedCount(); /** @return array */ public function getAllPostTypes(); /** @return int */ public function getLogDiskUsage(); /** * @param array $types * @param int $trashed * @return int */ public function getRecordCount($types = array(), $trashed = 0); /** * @param string $sub * @param string $failedQuery * @param array $tableOptions * @param array $queryResult * @return array */ public function captureViewQueryFailureDiagnostics(string $sub, string $failedQuery, array $tableOptions, array $queryResult): array; /* ---- hits-table lifecycle hook ---- */ /** @return void */ public function maybeUpdateRedirectsForViewHitsTable(): void; }