CacheCommandMutex
class CacheCommandMutex implements CommandMutex
Traits
Properties
| string|null | $store | The cache store that should be used. |
Methods
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.
Given a start time, format the total run time for human readability.
Specify the cache store that should be used.
Details
in
InteractsWithTime at line 17
protected int
secondsUntil(DateInterval|DateTimeInterface|int $delay)
Get the number of seconds until the given DateTime.
in
InteractsWithTime at line 29
protected int
availableAt(DateInterval|DateTimeInterface|int|null $delay = 0)
Get the "available at" UNIX timestamp.
in
InteractsWithTime at line 41
protected DateTimeInterface|int
parseDateInterval(DateInterval|DateTimeInterface|int|null $delay)
If the given value is an interval, convert it to a DateTime instance.
in
InteractsWithTime at line 57
protected int
currentTime()
Get the current system time as a UNIX timestamp.
in
InteractsWithTime at line 65
protected string
runTimeForHumans(float $startTime, float|null $endTime = null)
Given a start time, format the total run time for human readability.
at line 22
__construct(Factory $cache)
No description
at line 30
bool
create(Command $command)
Attempt to obtain a command mutex for the given command.
at line 52
bool
exists(Command $command)
Determine if a command mutex exists for the given command.
at line 69
bool
forget(Command $command)
Release the mutex for the given command.
at line 86
protected string
commandMutexName(Command $command)
Get the isolatable command mutex name.
at line 100
protected bool
shouldUseLocks(Store $store)
Determine if the given store should use locks for command mutexes.
at line 111
CacheCommandMutex
useStore(string|null $store)
Specify the cache store that should be used.
Boot-only. Mutates the shared command mutex instance for the worker lifetime; per-request use races across coroutines.