private function tryAcquire($operation, $lock_type)
    {
        $log_data = [
            "lock_file" => $this->lock_file,
            "lock_type" => $lock_type
        ];

        if (!$this->flock($operation)) {
            $this->logger->debug("could not acquire {lock_type} lock on {lock_file}", $log_data);

            throw new RuntimeException(
                "Could not acquire $lock_type lock on {$this->lock_file}"
            );

        }

        $this->logger->debug("{lock_type} lock acquired on {lock_file}", $log_data);
    }