protected function lockFile($nbTries = 0)
    {
        if (!$this->lockHandler->lock()) {
            if ($nbTries >= static::MAX_LOCK_TRIES) {
                throw new DataStoreException(
                    sprintf("Reach max retry (%s) for locking queue file {$this->filename}", static::MAX_LOCK_TRIES)
                );
            }

            usleep(10);

            return $this->lockFile($nbTries + 1);
        }

        return true;
    }