Spec-Zone.ru › Laravel 10

CacheCommandMutex

class CacheCommandMutex implements CommandMutex (View source)

Traits

InteractsWithTime

Properties

Factory $cache

The cache factory implementation.

string|null $store

The cache store that should be used.

Methods

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
__construct(Factory $cache)

Create a new command mutex.

bool create(Command $command)

Attempt to obtain a command mutex for the given command.

bool exists(Command $command)

Determine if a command mutex exists for the given command.

bool forget(Command $command)

Release the mutex for the given command.

string commandMutexName(Command $command)

Get the isolatable command mutex name.

$this useStore(string|null $store)

Specify the cache store that should be used.

bool shouldUseLocks(Store $store)

Determine if the given store should use locks for command mutexes.

Details

protected int secondsUntil(DateTimeInterface|DateInterval|int $delay)

Get the number of seconds until the given DateTime.

Parameters

DateTimeInterface|DateInterval|int $delay

Return Value

int

protected int availableAt(DateTimeInterface|DateInterval|int $delay = 0)

Get the "available at" UNIX timestamp.

Parameters

DateTimeInterface|DateInterval|int $delay

Return Value

int

protected DateTimeInterface|int parseDateInterval(DateTimeInterface|DateInterval|int $delay)

If the given value is an interval, convert it to a DateTime instance.

Parameters

DateTimeInterface|DateInterval|int $delay

Return Value

DateTimeInterface|int

protected int currentTime()

Get the current system time as a UNIX timestamp.

Return Value

int

__construct(Factory $cache)

Create a new command mutex.

Parameters

Factory $cache

bool create(Command $command)

Attempt to obtain a command mutex for the given command.

Parameters

Command $command

Return Value

bool

bool exists(Command $command)

Determine if a command mutex exists for the given command.

Parameters

Command $command

Return Value

bool

bool forget(Command $command)

Release the mutex for the given command.

Parameters

Command $command

Return Value

bool

protected string commandMutexName(Command $command)

Get the isolatable command mutex name.

Parameters

Command $command

Return Value

string

$this useStore(string|null $store)

Specify the cache store that should be used.

Parameters

string|null $store

Return Value

$this

protected bool shouldUseLocks(Store $store)

Determine if the given store should use locks for command mutexes.

Parameters

Store $store

Return Value

bool

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Console/CacheCommandMutex.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API