]> git.mxchange.org Git - core.git/blobdiff - framework/main/interfaces/iterator/file/class_SeekableWritableFileIterator.php
Continued:
[core.git] / framework / main / interfaces / iterator / file / class_SeekableWritableFileIterator.php
index e2c9fe4718c4efd49ca87a61c21ae5598af7c0ce..b93ace41d438e4296208860bf6491db3408863a5 100644 (file)
@@ -35,7 +35,7 @@ interface SeekableWritableFileIterator extends SeekableIterator {
         * @param       $seekPosition   Seek position in file
         * @return      $status                 Status of this operation
         */
-       function seek ($seekPosition);
+       function seek (int $seekPosition);
 
        /**
         * Size of file stack
@@ -50,7 +50,7 @@ interface SeekableWritableFileIterator extends SeekableIterator {
         * @param       $bytes  Amount of bytes to read
         * @return      $data   Data read from file
         */
-       function read ($bytes);
+       function read (int $bytes);
 
        /**
         * Analyzes entries in index file. This will count all found (and valid)
@@ -81,7 +81,7 @@ interface SeekableWritableFileIterator extends SeekableIterator {
         * @param       $type   Type of the file
         * @return      void
         */
-       function preAllocateFile ($type);
+       function preAllocateFile (string $type);
 
        /**
         * Initializes counter for valid entries, arrays for damaged entries and
@@ -152,7 +152,7 @@ interface SeekableWritableFileIterator extends SeekableIterator {
         * @param       $flushHeader    Whether to flush the header (default: flush)
         * @return      void
         */
-       function writeData ($seekPosition, $data, bool $flushHeader = true);
+       function writeData (int $seekPosition, string $data, bool $flushHeader = true);
 
        /**
         * Getter for seek position
@@ -168,7 +168,7 @@ interface SeekableWritableFileIterator extends SeekableIterator {
         * @param       $value          Value to be added to the stack
         * @return      $data           Hash and gap position
         */
-       function writeValueToFile ($groupId, $value);
+       function writeValueToFile (string $groupId, $value);
 
        /**
         * Writes given raw data to the file and returns a gap position and length
@@ -178,7 +178,7 @@ interface SeekableWritableFileIterator extends SeekableIterator {
         * @param       $encoded        Encoded value to be written to the file
         * @return      $data           Gap position and length of the raw data
         */
-       function writeDataToFreeGap ($groupId, string $hash, $encoded);
+       function writeDataToFreeGap (string $groupId, string $hash, string $encoded);
 
        /**
         * Searches for next suitable gap the given length of data can fit in