PluginProbe
404 Solution / trunk
404 Solution vtrunk
4.3.5 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.2.0 4.1.19 4.1.18 4.1.17 4.1.16 4.1.15 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.1.7 4.1.6 4.1.5 4.1.4 4.1.3 trunk 2.30.0 All 109 releases
404-solution / includes / logs / LogsHitsRollupServiceInterface.php

LogsHitsRollupServiceInterface.php in 404 Solution trunk, at includes/logs/LogsHitsRollupServiceInterface.php

55 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (!defined('ABSPATH')) {
4 exit;
5 }
6
7 /**
8 * Public contract for the wp_abj404_logs_hits rollup lifecycle.
9 *
10 * Extracted from LogsRepository under M201. Owns:
11 * - existence/readiness checks for the rollup table
12 * - rollup rebuild (direct and chunked pipelines)
13 * - rebuild scheduling (cron + shutdown) with per-request dedupe
14 * - cross-request rebuild locking
15 * - staleness signaling (admin notice when cron is not running)
16 * - logsv2 max/min/stored-max id reads used by drift detection and read paths
17 * - last-scheduled / last-refreshed flags
18 *
19 * Log writes, log read queries, GDPR anonymization, and lookup-table CRUD
20 * stay on LogsRepository. LogsRepository forwards the rollup-lifecycle
21 * interface methods to this service.
22 */
23 interface ABJ_404_Solution_LogsHitsRollupServiceInterface {
24
25 /** @return void */
26 public function recordLogsHitsRollupStalenessSignal(): void;
27
28 /** @return bool */
29 public function hitsTableNeedsRebuild();
30
31 /** @return int|null Unix timestamp of last update, or null if table doesn't exist */
32 public function getLogsHitsTableLastUpdated();
33
34 /** @return bool */
35 public function createRedirectsForViewHitsTable(): bool;
36
37 /** @return bool */
38 public function logsHitsTableExists();
39
40 /** @return void */
41 public function scheduleHitsTableRebuild(): void;
42
43 /** @return int */
44 public function getMaxLogId();
45
46 /** @return int */
47 public function getMinLogId();
48
49 /** @return int */
50 public function getStoredMaxLogId();
51
52 /** @return int|null */
53 public function getLogsHitsTableLastScheduledAt();
54 }
55