.github
2 years ago
CannotObtainLockException.php
4 years ago
FsConnectionFactory.php
4 years ago
FsConsumer.php
4 years ago
FsContext.php
4 years ago
FsDestination.php
4 years ago
FsMessage.php
4 years ago
FsProducer.php
4 years ago
LICENSE
4 years ago
LegacyFilesystemLock.php
4 years ago
Lock.php
4 years ago
README.md
2 years ago
composer.json
2 years ago
Lock.php
26 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Enqueue\Fs; |
| 6 | |
| 7 | interface Lock |
| 8 | { |
| 9 | /** |
| 10 | * Returns the control If the look has been obtained |
| 11 | * If not, should throw CannotObtainLockException exception. |
| 12 | * |
| 13 | * @param FsDestination $destination |
| 14 | * |
| 15 | * @throws CannotObtainLockException if look could not be obtained |
| 16 | */ |
| 17 | public function lock(FsDestination $destination); |
| 18 | |
| 19 | /** |
| 20 | * @param FsDestination $destination |
| 21 | */ |
| 22 | public function release(FsDestination $destination); |
| 23 | |
| 24 | public function releaseAll(); |
| 25 | } |
| 26 |