* @Link https://gitee.com/xmo/MineAdmin */ declare(strict_types=1); namespace Builder\Crontab\Mutex; use Builder\Crontab\MineCrontab; interface ServerMutex { /** * Attempt to obtain a server mutex for the given crontab. * @param MineCrontab $crontab * @return bool */ public function attempt(MineCrontab $crontab): bool; /** * Get the server mutex for the given crontab. * @param MineCrontab $crontab * @return string */ public function get(MineCrontab $crontab): string; }