class UniqueLock (View source)

Properties

protected Repository $cache

The cache repository implementation.

Methods

void
__construct(Repository $cache)

Create a new unique lock manager instance.

bool
acquire(mixed $job)

Attempt to acquire a lock for the given job.

void
release(mixed $job)

Release the lock for the given job.

static string
getKey(mixed $job)

Generate the lock key for the given job.

Details

void __construct(Repository $cache)

Create a new unique lock manager instance.

Parameters

Repository $cache

Return Value

void

bool acquire(mixed $job)

Attempt to acquire a lock for the given job.

Parameters

mixed $job

Return Value

bool

void release(mixed $job)

Release the lock for the given job.

Parameters

mixed $job

Return Value

void

static string getKey(mixed $job)

Generate the lock key for the given job.

Parameters

mixed $job

Return Value

string

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.