Merge "Add .pipeline/ with dev image variant"
[lhc/web/wiklou.git] / includes / Storage / BlobStore.php
index 28caf3a..78885db 100644 (file)
@@ -22,6 +22,8 @@
 
 namespace MediaWiki\Storage;
 
+use StatusValue;
+
 /**
  * Service for loading and storing data blobs.
  *
@@ -95,6 +97,19 @@ interface BlobStore {
         */
        public function getBlob( $blobAddress, $queryFlags = 0 );
 
+       /**
+        * A batched version of BlobStore::getBlob.
+        *
+        * @param string[] $blobAddresses An array of blob addresses.
+        * @param int $queryFlags See IDBAccessObject.
+        * @throws BlobAccessException
+        * @return StatusValue A status with a map of blobAddress => binary blob data or null
+        *         if fetching the blob has failed. Fetch failures errors are the
+        *         warnings in the status object.
+        * @since 1.34
+        */
+       public function getBlobBatch( $blobAddresses, $queryFlags = 0 );
+
        /**
         * Stores an arbitrary blob of data and returns an address that can be used with
         * getBlob() to retrieve the same blob of data,
@@ -110,4 +125,10 @@ interface BlobStore {
         */
        public function storeBlob( $data, $hints = [] );
 
+       /**
+        * Check if the blob metadata or backing blob data store is read-only
+        *
+        * @return bool
+        */
+       public function isReadOnly();
 }