@Override
  public boolean processAll(@NotNull StorageObjectProcessor<? super Data> processor) throws IOException {
    //ensure no deadlocks on attempt to escalate read->write lock:
    storage.getStorageLockContext().checkReadLockNotHeld();

    int fileLengthLocal;
    lockWrite();
    try {
      force();

      fileLengthLocal = fileLength;
      if (fileLengthLocal == 0) {
        return true;
      }
    }
    finally {
      unlockWrite();
    }

    //Since it is append-only storage => already-written records never modified => could be read without locking:
    //Newer records appended after unlockWrite() -- will not be read, which is expectable

    IOCancellationCallbackHolder.checkCancelled();
    return storage.readInputStream(is -> {
      // calculation may restart few times, so it's expected that processor processes duplicates
      LimitedInputStream lis = new LimitedInputStream(new BufferedInputStream(is), fileLengthLocal) {
        @Override
        public int available() {
          return remainingLimit();
        }
      };
      DataInputStream valuesStream = new DataInputStream(lis);
      try {
        while (true) {
          int offset = lis.getBytesRead();
          Data value = dataDescriptor.read(valuesStream);
          if (!processor.process(offset, value)) return false;
        }
      }
      catch (EOFException e) {
        // Done
      }

      return true;
    });
  }
@Override
  public boolean processAll(@NotNull StorageObjectProcessor<? super Data> processor)