class ConcurrencyLimiterBuilder (View source)
| InteractsWithTime |
| Connection | $connection | The Redis connection. | |
| string | $name | The name of the lock. | |
| int | $maxLocks | The maximum number of entities that can hold the lock at the same time. | |
| int | $releaseAfter | The number of seconds to maintain the lock until it is automatically released. | |
| int | $timeout | The amount of time to block until a lock is available. | |
| int | $sleep | The number of milliseconds to wait between attempts to acquire the lock. |
| int | secondsUntil(DateTimeInterface|DateInterval|int $delay)
Get the number of seconds until the given DateTime. | from InteractsWithTime |
| int | availableAt(DateTimeInterface|DateInterval|int $delay = 0)
Get the "available at" UNIX timestamp. | from InteractsWithTime |
| DateTimeInterface|int | parseDateInterval(DateTimeInterface|DateInterval|int $delay)
If the given value is an interval, convert it to a DateTime instance. | from InteractsWithTime |
| int | currentTime()
Get the current system time as a UNIX timestamp. | from InteractsWithTime |
| string | runTimeForHumans(float $startTime, float $endTime = null)
Given a start time, format the total run time for human readability. | from InteractsWithTime |
| void | __construct(Connection $connection, string $name)
Create a new builder instance. | |
| $this | limit(int $maxLocks)
Set the maximum number of locks that can be obtained per time window. | |
| $this | releaseAfter(int $releaseAfter)
Set the number of seconds until the lock will be released. | |
| $this | block(int $timeout)
Set the amount of time to block until a lock is available. | |
| $this | sleep(int $sleep)
The number of milliseconds to wait between lock acquisition attempts. | |
| mixed | then(callable $callback, callable|null $failure = null)
Execute the given callback if a lock is obtained, otherwise call the failure callback. |
Get the number of seconds until the given DateTime.
Get the "available at" UNIX timestamp.
If the given value is an interval, convert it to a DateTime instance.
Get the current system time as a UNIX timestamp.
Given a start time, format the total run time for human readability.
Create a new builder instance.
Set the maximum number of locks that can be obtained per time window.
Set the number of seconds until the lock will be released.
Set the amount of time to block until a lock is available.
The number of milliseconds to wait between lock acquisition attempts.
Execute the given callback if a lock is obtained, otherwise call the failure callback.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Redis/Limiters/ConcurrencyLimiterBuilder.html