ClearableQueuePoolProxy
class ClearableQueuePoolProxy extends QueuePoolProxy implements ClearableQueue
Traits
Properties
| protected string | $connectionName | The logical connection name applied to each borrowed queue. |
from QueuePoolProxy |
| protected Queue): mixed): mixed | $afterCommitDispatcher | from QueuePoolProxy |
Methods
Create a pooled queue proxy.
Return idle database sessions before waiting for a queue connection.
Invoke a synchronous method on a borrowed object.
Apply the proxy's logical connection name to a borrowed queue.
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.
Publish due raw messages and defer future messages without losing their delays.
Get the number of pending jobs.
Get the number of delayed jobs.
Get the number of reserved jobs.
Get the pending jobs for the given queue.
Get the delayed jobs for the given queue.
Get the reserved jobs for the given queue.
Get the creation timestamp of the oldest pending job, excluding delayed jobs.
Push a new job onto the queue.
Push a new job onto the queue.
Push a raw payload onto the queue.
Push a new job onto the queue after (n) seconds.
Push a new job onto a specific queue after (n) seconds.
Push an array of jobs onto the queue.
Publish a stored batch while borrowing its transport only once.
Pop the next job off of the queue.
Delete all of the jobs from the queue.
Details
in
QueuePoolProxy at line 47
__construct(PoolDefinition $definition, Closure $createCallback, Factory $pools, Closure|null $releaseCallback = null)
Create a pooled queue proxy.
in
PoolProxy at line 29
protected ObjectPool
pool()
Resolve the current pool for this proxy's definition.
in
QueuePoolProxy at line 359
protected Lease
lease()
Return idle database sessions before waiting for a queue connection.
in
PoolProxy at line 55
protected mixed
invoke(string $method, array $arguments)
Invoke a synchronous method on a borrowed object.
in
QueuePoolProxy at line 369
protected void
configureBorrowed(object $object)
Apply the proxy's logical connection name to a borrowed queue.
in
PoolProxy at line 80
PoolDefinition
getDefinition()
Get this proxy's immutable pool definition.
in
PoolProxy at line 88
string
getPoolName()
Return the pool's fully qualified registry name.
in
PoolProxy at line 96
bool
invalidatePool()
Remove and close this proxy's current shared pool.
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 47
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 63
protected int
currentTime()
Get the current system time as a UNIX timestamp.
in
InteractsWithTime at line 71
protected string
runTimeForHumans(float $startTime, float|null $endTime = null)
Given a start time, format the total run time for human readability.
in
PublishesOutboxMessagesSequentially at line 23
protected OutboxBatchResult
publishOutboxMessagesSequentially(Queue $queue, array $messages)
Publish due raw messages and defer future messages without losing their delays.
in
QueuePoolProxy at line 69
int
size(UnitEnum|string|null $queue = null)
Get the size of the queue.
in
QueuePoolProxy at line 77
int
pendingSize(UnitEnum|string|null $queue = null)
Get the number of pending jobs.
in
QueuePoolProxy at line 85
int
delayedSize(UnitEnum|string|null $queue = null)
Get the number of delayed jobs.
in
QueuePoolProxy at line 93
int
reservedSize(UnitEnum|string|null $queue = null)
Get the number of reserved jobs.
in
QueuePoolProxy at line 101
int
totalSize()
Get the number of jobs across every queue.
in
QueuePoolProxy at line 109
int
totalPendingSize()
Get the number of pending jobs across every queue.
in
QueuePoolProxy at line 117
int
totalDelayedSize()
Get the number of delayed jobs across every queue.
in
QueuePoolProxy at line 125
int
totalReservedSize()
Get the number of reserved jobs across every queue.
in
QueuePoolProxy at line 133
Collection
pendingJobs(UnitEnum|string|null $queue = null)
Get the pending jobs for the given queue.
in
QueuePoolProxy at line 141
Collection
delayedJobs(UnitEnum|string|null $queue = null)
Get the delayed jobs for the given queue.
in
QueuePoolProxy at line 149
Collection
reservedJobs(UnitEnum|string|null $queue = null)
Get the reserved jobs for the given queue.
in
QueuePoolProxy at line 157
Collection
allPendingJobs()
Get all pending jobs across every queue.
in
QueuePoolProxy at line 165
Collection
allDelayedJobs()
Get all delayed jobs across every queue.
in
QueuePoolProxy at line 173
Collection
allReservedJobs()
Get all reserved jobs across every queue.
in
QueuePoolProxy at line 181
int|null
creationTimeOfOldestPendingJob(UnitEnum|string|null $queue = null)
Get the creation timestamp of the oldest pending job, excluding delayed jobs.
in
QueuePoolProxy at line 189
mixed
push(object|string $job, mixed $data = '', UnitEnum|string|null $queue = null)
Push a new job onto the queue.
in
QueuePoolProxy at line 197
mixed
pushOn(UnitEnum|string|null $queue, object|string $job, mixed $data = '')
Push a new job onto the queue.
in
QueuePoolProxy at line 205
mixed
pushRaw(string $payload, UnitEnum|string|null $queue = null, array $options = [])
Push a raw payload onto the queue.
in
QueuePoolProxy at line 213
mixed
later(DateInterval|DateTimeInterface|int $delay, object|string $job, mixed $data = '', UnitEnum|string|null $queue = null)
Push a new job onto the queue after (n) seconds.
in
QueuePoolProxy at line 221
mixed
laterOn(UnitEnum|string|null $queue, DateInterval|DateTimeInterface|int $delay, object|string $job, mixed $data = '')
Push a new job onto a specific queue after (n) seconds.
in
QueuePoolProxy at line 229
mixed
bulk(array $jobs, mixed $data = '', UnitEnum|string|null $queue = null)
Push an array of jobs onto the queue.
in
QueuePoolProxy at line 239
OutboxBatchResult
publishOutboxMessages(array $messages)
Publish a stored batch while borrowing its transport only once.
in
QueuePoolProxy at line 254
mixed
withConnection(Closure $callback)
Run a callback with the underlying SQS queue.
in
QueuePoolProxy at line 269
Job|null
pop(UnitEnum|string|null $queue = null, int $index = 0)
Pop the next job off of the queue.
in
QueuePoolProxy at line 334
string
getConnectionName()
Get the connection name for the queue.
in
QueuePoolProxy at line 348
Queue
setConnectionName(string $name)
Set the connection name for the queue.
Queue connection proxies are cached on QueueManager; runtime use races across coroutines and changes every concurrent dispatch through this connection.
in
QueuePoolProxy at line 381
protected mixed
usingConnection(Closure $callback)
Run a callback with a borrowed queue.
at line 15
int
clear(UnitEnum|string|null $queue = null)
Delete all of the jobs from the queue.