MediaWiki REL1_35
|
Class for tracking per-entity dependency path lists in the module_deps table. More...
Public Member Functions | |
__construct (ILoadBalancer $lb) | |
remove ( $type, $entities) | |
Delete the currently tracked dependencies for an entity or set of entities. | |
renew ( $type, $entities, $ttl) | |
Set the expiry for the currently tracked dependencies for an entity or set of entities. | |
retrieveMulti ( $type, array $entities) | |
Get the currently tracked dependencies for a set of entities. | |
storeMulti ( $type, array $dataByEntity, $ttl) | |
Set the currently tracked dependencies for a set of entities. | |
Public Member Functions inherited from Wikimedia\DependencyStore\DependencyStore | |
newEntityDependencies (array $paths=[], $asOf=null) | |
retrieve ( $type, $entity) | |
Get the currently tracked dependencies for an entity. | |
store ( $type, $entity, array $data, $ttl) | |
Set the currently tracked dependencies for an entity. | |
Private Member Functions | |
fetchDependencyBlobs (array $entities, IDatabase $db) | |
getEntityNameComponents ( $entity) | |
getMasterDb () | |
getReplicaDb () | |
Private Attributes | |
ILoadBalancer | $lb |
Class for tracking per-entity dependency path lists in the module_deps table.
This should not be used outside of ResourceLoader and ResourceLoaderModule
Definition at line 37 of file SqlModuleDependencyStore.php.
Wikimedia\DependencyStore\SqlModuleDependencyStore::__construct | ( | ILoadBalancer | $lb | ) |
ILoadBalancer | $lb | Storage backend |
Definition at line 44 of file SqlModuleDependencyStore.php.
References Wikimedia\DependencyStore\SqlModuleDependencyStore\$lb.
|
private |
string[] | $entities | |
IDatabase | $db |
Definition at line 151 of file SqlModuleDependencyStore.php.
References $modules, $res, Wikimedia\DependencyStore\SqlModuleDependencyStore\getEntityNameComponents(), Wikimedia\Rdbms\IDatabase\makeList(), and Wikimedia\Rdbms\IDatabase\select().
Referenced by Wikimedia\DependencyStore\SqlModuleDependencyStore\retrieveMulti(), and Wikimedia\DependencyStore\SqlModuleDependencyStore\storeMulti().
|
private |
string | $entity |
Definition at line 205 of file SqlModuleDependencyStore.php.
Referenced by Wikimedia\DependencyStore\SqlModuleDependencyStore\fetchDependencyBlobs(), Wikimedia\DependencyStore\SqlModuleDependencyStore\remove(), and Wikimedia\DependencyStore\SqlModuleDependencyStore\storeMulti().
|
private |
Definition at line 196 of file SqlModuleDependencyStore.php.
References DB_MASTER.
Referenced by Wikimedia\DependencyStore\SqlModuleDependencyStore\remove(), and Wikimedia\DependencyStore\SqlModuleDependencyStore\storeMulti().
|
private |
Definition at line 188 of file SqlModuleDependencyStore.php.
References DB_REPLICA.
Referenced by Wikimedia\DependencyStore\SqlModuleDependencyStore\retrieveMulti().
Wikimedia\DependencyStore\SqlModuleDependencyStore::remove | ( | $type, | |
$entities | |||
) |
Delete the currently tracked dependencies for an entity or set of entities.
string | $type | Entity type |
string | string[] | $entities | Entity name(s) |
DependencyStoreException |
Reimplemented from Wikimedia\DependencyStore\DependencyStore.
Definition at line 117 of file SqlModuleDependencyStore.php.
References Wikimedia\DependencyStore\SqlModuleDependencyStore\getEntityNameComponents(), and Wikimedia\DependencyStore\SqlModuleDependencyStore\getMasterDb().
Wikimedia\DependencyStore\SqlModuleDependencyStore::renew | ( | $type, | |
$entities, | |||
$ttl | |||
) |
Set the expiry for the currently tracked dependencies for an entity or set of entities.
string | $type | Entity type |
string | string[] | $entities | Entity name(s) |
int | $ttl | New time-to-live in seconds |
DependencyStoreException |
Reimplemented from Wikimedia\DependencyStore\DependencyStore.
Definition at line 142 of file SqlModuleDependencyStore.php.
Wikimedia\DependencyStore\SqlModuleDependencyStore::retrieveMulti | ( | $type, | |
array | $entities | ||
) |
Get the currently tracked dependencies for a set of entities.
string | $type | Entity type |
string[] | $entities | Entity names |
DependencyStoreException |
Reimplemented from Wikimedia\DependencyStore\DependencyStore.
Definition at line 48 of file SqlModuleDependencyStore.php.
References $dbr, Wikimedia\DependencyStore\SqlModuleDependencyStore\fetchDependencyBlobs(), Wikimedia\DependencyStore\SqlModuleDependencyStore\getReplicaDb(), and Wikimedia\DependencyStore\DependencyStore\newEntityDependencies().
Wikimedia\DependencyStore\SqlModuleDependencyStore::storeMulti | ( | $type, | |
array | $dataByEntity, | ||
$ttl | |||
) |
Set the currently tracked dependencies for a set of entities.
string | $type | Entity type |
array[] | $dataByEntity | Map of (entity => (paths: paths, asOf: UNIX timestamp or null)) |
int | $ttl | New time-to-live in seconds |
DependencyStoreException |
Reimplemented from Wikimedia\DependencyStore\DependencyStore.
Definition at line 71 of file SqlModuleDependencyStore.php.
References $blob, Wikimedia\DependencyStore\SqlModuleDependencyStore\fetchDependencyBlobs(), Wikimedia\DependencyStore\SqlModuleDependencyStore\getEntityNameComponents(), and Wikimedia\DependencyStore\SqlModuleDependencyStore\getMasterDb().
|
private |
Definition at line 39 of file SqlModuleDependencyStore.php.
Referenced by Wikimedia\DependencyStore\SqlModuleDependencyStore\__construct().