<?php
/**
 * Scan lock storage contract.
 *
 * @package LocalGuardScanner
 */

namespace LocalGuardScanner\Application\Scan;

/**
 * Provides atomic creation for a network-wide lock.
 */
interface LockStore {
	/** @param string $value Serialized lock. @return bool */
	public function add( $value ): bool;

	/** @return string|null */
	public function get(): ?string;

	/** @param string $value Serialized lock. @return bool */
	public function update( $value ): bool;

	/** @return bool */
	public function delete(): bool;
}
