]> git.mxchange.org Git - hub.git/blobdiff - application/hub/interfaces/package/fragmenter/class_Fragmentable.php
Continued with package fragmenter (a lot new, but unfinished code)
[hub.git] / application / hub / interfaces / package / fragmenter / class_Fragmentable.php
index b511efd6647ed5ca9462c018b975bde53d76c271..5a3ebe80d54633187bf96c9e05bb66ff933f808a 100644 (file)
@@ -25,22 +25,24 @@ interface Fragmentable extends FrameworkInterface {
        /**
         * This method does "implode" the given package data array into one long
         * string, splits it into small chunks, adds a serial number and checksum
-        * to all chunks and prepends a final hashsum chunk.
+        * to all chunks and prepends a final hashsum chunk. It will return the
+        * final hash for faster processing of packages.
         *
         * @param       $packageData                    Raw package data array
         * @param       $connectionInstance             A helper instance for connections
-        * @return      void
+        * @return      $finalHash                              Final hash for faster processing
         */
        function fragmentPackageArray (array $packageData, BaseConnectionHelper $connectionInstance);
 
        /**
         * This method gets the next chunk from the internal FIFO which should be
-        * sent to the given recipient.
+        * sent to the given recipient. It will return an associative array where
+        * the key is the chunk hash and value the raw chunk data.
         *
-        * @param       $packageData    Raw package data array
+        * @param       $finalHash              Final hash for faster lookup
         * @return      $rawDataChunk   Raw package data chunk
         */
-       function getNextRawDataChunk (array $packageData);
+       function getNextRawDataChunk ($finalHash);
 }
 
 // [EOF]