class QueuePoolProxy extends PoolProxy implements Queue

Properties

protected string $connectionName

The logical connection name applied to each borrowed queue.

protected Queue): mixed): mixed $afterCommitDispatcher

Methods

__construct(PoolDefinition $definition, Closure $resolver, Factory $pools, Closure|null $releaseCallback = null)

Create a pooled queue proxy.

pool()

Resolve the current pool for this proxy's definition.

lease()

Borrow an object under an exactly-once lease.

mixed
invoke(string $method, array $arguments)

Invoke a synchronous method on a borrowed object.

void
configureBorrowed(object $object)

Apply the proxy's logical connection name to a borrowed queue.

getDefinition()

Get this proxy's immutable pool definition.

string
getPoolName()

Get this proxy's pool identity.

bool
invalidatePool()

Remove and close this proxy's current shared pool.

int
size(string|null $queue = null)

Get the size of the queue.

int
pendingSize(string|null $queue = null)

Get the number of pending jobs.

int
delayedSize(string|null $queue = null)

Get the number of delayed jobs.

int
reservedSize(string|null $queue = null)

Get the number of reserved jobs.

pendingJobs(string|null $queue = null)

Get the pending jobs for the given queue.

delayedJobs(string|null $queue = null)

Get the delayed jobs for the given queue.

reservedJobs(string|null $queue = null)

Get the reserved jobs for the given queue.

allPendingJobs()

Get all pending jobs across every queue.

allDelayedJobs()

Get all delayed jobs across every queue.

allReservedJobs()

Get all reserved jobs across every queue.

int|null
creationTimeOfOldestPendingJob(string|null $queue = null)

Get the creation timestamp of the oldest pending job, excluding delayed jobs.

mixed
push(object|string $job, mixed $data = '', string|null $queue = null)

Push a new job onto the queue.

mixed
pushOn(string|null $queue, object|string $job, mixed $data = '')

Push a new job onto the queue.

mixed
pushRaw(string $payload, string|null $queue = null, array $options = [])

Push a raw payload onto the queue.

mixed
later(DateInterval|DateTimeInterface|int $delay, object|string $job, mixed $data = '', string|null $queue = null)

Push a new job onto the queue after (n) seconds.

mixed
laterOn(string|null $queue, DateInterval|DateTimeInterface|int $delay, object|string $job, mixed $data = '')

Push a new job onto a specific queue after (n) seconds.

mixed
bulk(array $jobs, mixed $data = '', string|null $queue = null)

Push an array of jobs onto the queue.

mixed
withConnection(Closure $callback)

Run a callback with the underlying SQS queue.

Job|null
pop(string|null $queue = null)

Pop the next job off of the queue.

string
getConnectionName()

Get the connection name for the queue.

setConnectionName(string $name)

Set the connection name for the queue.

mixed
usingConnection(Closure $callback)

Run a callback with a borrowed queue.

Details

at line 34
__construct(PoolDefinition $definition, Closure $resolver, Factory $pools, Closure|null $releaseCallback = null)

Create a pooled queue proxy.

Parameters

PoolDefinition $definition
Closure $resolver
Factory $pools
Closure|null $releaseCallback

in PoolProxy at line 28
protected ObjectPool pool()

Resolve the current pool for this proxy's definition.

Return Value

ObjectPool

in PoolProxy at line 36
protected Lease lease()

Borrow an object under an exactly-once lease.

Return Value

Lease

in PoolProxy at line 59
protected mixed invoke(string $method, array $arguments)

Invoke a synchronous method on a borrowed object.

Parameters

string $method
array $arguments

Return Value

mixed

at line 297
protected void configureBorrowed(object $object)

Apply the proxy's logical connection name to a borrowed queue.

Parameters

object $object

Return Value

void

in PoolProxy at line 90
PoolDefinition getDefinition()

Get this proxy's immutable pool definition.

Return Value

PoolDefinition

in PoolProxy at line 98
string getPoolName()

Get this proxy's pool identity.

Return Value

string

in PoolProxy at line 106
bool invalidatePool()

Remove and close this proxy's current shared pool.

Return Value

bool

at line 56
int size(string|null $queue = null)

Get the size of the queue.

Parameters

string|null $queue

Return Value

int

at line 64
int pendingSize(string|null $queue = null)

Get the number of pending jobs.

Parameters

string|null $queue

Return Value

int

at line 72
int delayedSize(string|null $queue = null)

Get the number of delayed jobs.

Parameters

string|null $queue

Return Value

int

at line 80
int reservedSize(string|null $queue = null)

Get the number of reserved jobs.

Parameters

string|null $queue

Return Value

int

at line 88
Collection pendingJobs(string|null $queue = null)

Get the pending jobs for the given queue.

Parameters

string|null $queue

Return Value

Collection

at line 96
Collection delayedJobs(string|null $queue = null)

Get the delayed jobs for the given queue.

Parameters

string|null $queue

Return Value

Collection

at line 104
Collection reservedJobs(string|null $queue = null)

Get the reserved jobs for the given queue.

Parameters

string|null $queue

Return Value

Collection

at line 112
Collection allPendingJobs()

Get all pending jobs across every queue.

Return Value

Collection

at line 120
Collection allDelayedJobs()

Get all delayed jobs across every queue.

Return Value

Collection

at line 128
Collection allReservedJobs()

Get all reserved jobs across every queue.

Return Value

Collection

at line 136
int|null creationTimeOfOldestPendingJob(string|null $queue = null)

Get the creation timestamp of the oldest pending job, excluding delayed jobs.

Parameters

string|null $queue

Return Value

int|null

at line 144
mixed push(object|string $job, mixed $data = '', string|null $queue = null)

Push a new job onto the queue.

Parameters

object|string $job
mixed $data
string|null $queue

Return Value

mixed

at line 152
mixed pushOn(string|null $queue, object|string $job, mixed $data = '')

Push a new job onto the queue.

Parameters

string|null $queue
object|string $job
mixed $data

Return Value

mixed

at line 160
mixed pushRaw(string $payload, string|null $queue = null, array $options = [])

Push a raw payload onto the queue.

Parameters

string $payload
string|null $queue
array $options

Return Value

mixed

at line 168
mixed later(DateInterval|DateTimeInterface|int $delay, object|string $job, mixed $data = '', string|null $queue = null)

Push a new job onto the queue after (n) seconds.

Parameters

DateInterval|DateTimeInterface|int $delay
object|string $job
mixed $data
string|null $queue

Return Value

mixed

at line 176
mixed laterOn(string|null $queue, DateInterval|DateTimeInterface|int $delay, object|string $job, mixed $data = '')

Push a new job onto a specific queue after (n) seconds.

Parameters

string|null $queue
DateInterval|DateTimeInterface|int $delay
object|string $job
mixed $data

Return Value

mixed

at line 184
mixed bulk(array $jobs, mixed $data = '', string|null $queue = null)

Push an array of jobs onto the queue.

Parameters

array $jobs
mixed $data
string|null $queue

Return Value

mixed

at line 194
mixed withConnection(Closure $callback)

Run a callback with the underlying SQS queue.

Parameters

Closure $callback

Return Value

mixed

at line 209
Job|null pop(string|null $queue = null)

Pop the next job off of the queue.

Parameters

string|null $queue

Return Value

Job|null

at line 279
string getConnectionName()

Get the connection name for the queue.

Return Value

string

at line 287
Queue setConnectionName(string $name)

Set the connection name for the queue.

Parameters

string $name

Return Value

Queue

at line 309
protected mixed usingConnection(Closure $callback)

Run a callback with a borrowed queue.

Parameters

Closure $callback

Return Value

mixed