diff options
| author | polo <ordipolo@gmx.fr> | 2024-08-13 23:45:21 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2024-08-13 23:45:21 +0200 |
| commit | bf6655a534a6775d30cafa67bd801276bda1d98d (patch) | |
| tree | c6381e3f6c81c33eab72508f410b165ba05f7e9c /vendor/doctrine/orm/src/Cache/ConcurrentRegion.php | |
| parent | 94d67a4b51f8e62e7d518cce26a526ae1ec48278 (diff) | |
| download | AppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.tar.gz AppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.tar.bz2 AppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.zip | |
VERSION 0.2 doctrine ORM et entités
Diffstat (limited to 'vendor/doctrine/orm/src/Cache/ConcurrentRegion.php')
| -rw-r--r-- | vendor/doctrine/orm/src/Cache/ConcurrentRegion.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/vendor/doctrine/orm/src/Cache/ConcurrentRegion.php b/vendor/doctrine/orm/src/Cache/ConcurrentRegion.php new file mode 100644 index 0000000..e9ca870 --- /dev/null +++ b/vendor/doctrine/orm/src/Cache/ConcurrentRegion.php | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | declare(strict_types=1); | ||
| 4 | |||
| 5 | namespace Doctrine\ORM\Cache; | ||
| 6 | |||
| 7 | /** | ||
| 8 | * Defines contract for concurrently managed data region. | ||
| 9 | * It should be able to lock an specific cache entry in an atomic operation. | ||
| 10 | * | ||
| 11 | * When a entry is locked another process should not be able to read or write the entry. | ||
| 12 | * All evict operation should not consider locks, even though an entry is locked evict should be able to delete the entry and its lock. | ||
| 13 | */ | ||
| 14 | interface ConcurrentRegion extends Region | ||
| 15 | { | ||
| 16 | /** | ||
| 17 | * Attempts to read lock the mapping for the given key. | ||
| 18 | * | ||
| 19 | * @param CacheKey $key The key of the item to lock. | ||
| 20 | * | ||
| 21 | * @return Lock|null A lock instance or NULL if the lock already exists. | ||
| 22 | * | ||
| 23 | * @throws LockException Indicates a problem accessing the region. | ||
| 24 | */ | ||
| 25 | public function lock(CacheKey $key): Lock|null; | ||
| 26 | |||
| 27 | /** | ||
| 28 | * Attempts to read unlock the mapping for the given key. | ||
| 29 | * | ||
| 30 | * @param CacheKey $key The key of the item to unlock. | ||
| 31 | * @param Lock $lock The lock previously obtained from {@link readLock} | ||
| 32 | * | ||
| 33 | * @throws LockException Indicates a problem accessing the region. | ||
| 34 | */ | ||
| 35 | public function unlock(CacheKey $key, Lock $lock): bool; | ||
| 36 | } | ||
