platform/api/laravel/Redis/Limiters/ConcurrencyLimiterBuilder.yaml
2024-09-02 10:44:11 -07:00

145 lines
3.6 KiB
YAML

name: ConcurrencyLimiterBuilder
class_comment: null
dependencies:
- name: LimiterTimeoutException
type: class
source: Illuminate\Contracts\Redis\LimiterTimeoutException
- name: InteractsWithTime
type: class
source: Illuminate\Support\InteractsWithTime
- name: InteractsWithTime
type: class
source: InteractsWithTime
properties:
- name: connection
visibility: public
comment: '# * The Redis connection.
# *
# * @var \Illuminate\Redis\Connections\Connection'
- name: name
visibility: public
comment: '# * The name of the lock.
# *
# * @var string'
- name: maxLocks
visibility: public
comment: '# * The maximum number of entities that can hold the lock at the same
time.
# *
# * @var int'
- name: releaseAfter
visibility: public
comment: '# * The number of seconds to maintain the lock until it is automatically
released.
# *
# * @var int'
- name: timeout
visibility: public
comment: '# * The amount of time to block until a lock is available.
# *
# * @var int'
- name: sleep
visibility: public
comment: '# * The number of milliseconds to wait between attempts to acquire the
lock.
# *
# * @var int'
methods:
- name: __construct
visibility: public
parameters:
- name: connection
- name: name
comment: "# * The Redis connection.\n# *\n# * @var \\Illuminate\\Redis\\Connections\\\
Connection\n# */\n# public $connection;\n# \n# /**\n# * The name of the lock.\n\
# *\n# * @var string\n# */\n# public $name;\n# \n# /**\n# * The maximum number\
\ of entities that can hold the lock at the same time.\n# *\n# * @var int\n# */\n\
# public $maxLocks;\n# \n# /**\n# * The number of seconds to maintain the lock\
\ until it is automatically released.\n# *\n# * @var int\n# */\n# public $releaseAfter\
\ = 60;\n# \n# /**\n# * The amount of time to block until a lock is available.\n\
# *\n# * @var int\n# */\n# public $timeout = 3;\n# \n# /**\n# * The number of\
\ milliseconds to wait between attempts to acquire the lock.\n# *\n# * @var int\n\
# */\n# public $sleep = 250;\n# \n# /**\n# * Create a new builder instance.\n\
# *\n# * @param \\Illuminate\\Redis\\Connections\\Connection $connection\n#\
\ * @param string $name\n# * @return void"
- name: limit
visibility: public
parameters:
- name: maxLocks
comment: '# * Set the maximum number of locks that can be obtained per time window.
# *
# * @param int $maxLocks
# * @return $this'
- name: releaseAfter
visibility: public
parameters:
- name: releaseAfter
comment: '# * Set the number of seconds until the lock will be released.
# *
# * @param int $releaseAfter
# * @return $this'
- name: block
visibility: public
parameters:
- name: timeout
comment: '# * Set the amount of time to block until a lock is available.
# *
# * @param int $timeout
# * @return $this'
- name: sleep
visibility: public
parameters:
- name: sleep
comment: '# * The number of milliseconds to wait between lock acquisition attempts.
# *
# * @param int $sleep
# * @return $this'
- name: then
visibility: public
parameters:
- name: callback
- name: failure
default: 'null'
comment: '# * Execute the given callback if a lock is obtained, otherwise call the
failure callback.
# *
# * @param callable $callback
# * @param callable|null $failure
# * @return mixed
# *
# * @throws \Illuminate\Contracts\Redis\LimiterTimeoutException'
traits:
- Illuminate\Contracts\Redis\LimiterTimeoutException
- Illuminate\Support\InteractsWithTime
- InteractsWithTime
interfaces: []