platform/api/symfony/Component/Semaphore/SemaphoreFactory.yaml
2024-09-02 10:44:11 -07:00

54 lines
1.9 KiB
YAML

name: SemaphoreFactory
class_comment: "# * Factory provides method to create semaphores.\n# *\n# * @author\
\ Gr\xE9goire Pineau <lyrixx@lyrixx.info>\n# * @author J\xE9r\xE9my Deruss\xE9 <jeremy@derusse.com>\n\
# * @author Hamza Amrouche <hamza.simperfit@gmail.com>"
dependencies:
- name: LoggerAwareInterface
type: class
source: Psr\Log\LoggerAwareInterface
- name: LoggerAwareTrait
type: class
source: Psr\Log\LoggerAwareTrait
- name: LoggerAwareTrait
type: class
source: LoggerAwareTrait
properties: []
methods:
- name: createSemaphore
visibility: public
parameters:
- name: resource
- name: limit
- name: weight
default: '1'
- name: ttlInSecond
default: '300.0'
- name: autoRelease
default: 'true'
comment: "# * Factory provides method to create semaphores.\n# *\n# * @author Gr\xE9\
goire Pineau <lyrixx@lyrixx.info>\n# * @author J\xE9r\xE9my Deruss\xE9 <jeremy@derusse.com>\n\
# * @author Hamza Amrouche <hamza.simperfit@gmail.com>\n# */\n# class SemaphoreFactory\
\ implements LoggerAwareInterface\n# {\n# use LoggerAwareTrait;\n# \n# public\
\ function __construct(\n# private PersistingStoreInterface $store,\n# ) {\n#\
\ }\n# \n# /**\n# * @param float|null $ttlInSecond Maximum expected semaphore\
\ duration in seconds\n# * @param bool $autoRelease Whether to automatically\
\ release the semaphore or not when the semaphore instance is destroyed"
- name: createSemaphoreFromKey
visibility: public
parameters:
- name: key
- name: ttlInSecond
default: '300.0'
- name: autoRelease
default: 'true'
comment: '# * @param float|null $ttlInSecond Maximum expected semaphore duration
in seconds
# * @param bool $autoRelease Whether to automatically release the semaphore
or not when the semaphore instance is destroyed'
traits:
- Psr\Log\LoggerAwareInterface
- Psr\Log\LoggerAwareTrait
- LoggerAwareTrait
interfaces:
- LoggerAwareInterface