3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
11 namespace Civi\Core\Lock
;
16 interface LockInterface
{
21 * @param int|null $timeout
22 * The number of seconds to wait to get the lock.
23 * For a default value, use NULL.
26 public function acquire($timeout = NULL);
29 * @return bool|null|string
32 public function release();
35 * @return bool|null|string
38 * Not supported by some locking strategies. If you need to poll, better
41 public function isFree();
46 public function isAcquired();