interface PrunableBatchRepository implements BatchRepository (View source)

Methods

Batch[]
get(int $limit, mixed $before)

Retrieve a list of batches.

Batch|null
find(string $batchId)

Retrieve information about an existing batch.

store(PendingBatch $batch)

Store a new pending batch.

void
incrementTotalJobs(string $batchId, int $amount)

Increment the total number of jobs within the batch.

decrementPendingJobs(string $batchId, string $jobId)

Decrement the total number of pending jobs for the batch.

incrementFailedJobs(string $batchId, string $jobId)

Increment the total number of failed jobs for the batch.

void
markAsFinished(string $batchId)

Mark the batch that has the given ID as finished.

void
cancel(string $batchId)

Cancel the batch that has the given ID.

void
delete(string $batchId)

Delete the batch that has the given ID.

mixed
transaction(Closure $callback)

Execute the given Closure within a storage specific transaction.

void
rollBack()

Rollback the last database transaction for the connection.

int
prune(DateTimeInterface $before)

Prune all of the entries older than the given date.

Details

Batch[] get(int $limit, mixed $before)

Retrieve a list of batches.

Parameters

int $limit
mixed $before

Return Value

Batch[]

Batch|null find(string $batchId)

Retrieve information about an existing batch.

Parameters

string $batchId

Return Value

Batch|null

Batch store(PendingBatch $batch)

Store a new pending batch.

Parameters

PendingBatch $batch

Return Value

Batch

void incrementTotalJobs(string $batchId, int $amount)

Increment the total number of jobs within the batch.

Parameters

string $batchId
int $amount

Return Value

void

UpdatedBatchJobCounts decrementPendingJobs(string $batchId, string $jobId)

Decrement the total number of pending jobs for the batch.

Parameters

string $batchId
string $jobId

Return Value

UpdatedBatchJobCounts

UpdatedBatchJobCounts incrementFailedJobs(string $batchId, string $jobId)

Increment the total number of failed jobs for the batch.

Parameters

string $batchId
string $jobId

Return Value

UpdatedBatchJobCounts

void markAsFinished(string $batchId)

Mark the batch that has the given ID as finished.

Parameters

string $batchId

Return Value

void

void cancel(string $batchId)

Cancel the batch that has the given ID.

Parameters

string $batchId

Return Value

void

void delete(string $batchId)

Delete the batch that has the given ID.

Parameters

string $batchId

Return Value

void

mixed transaction(Closure $callback)

Execute the given Closure within a storage specific transaction.

Parameters

Closure $callback

Return Value

mixed

void rollBack()

Rollback the last database transaction for the connection.

Return Value

void

int prune(DateTimeInterface $before)

Prune all of the entries older than the given date.

Parameters

DateTimeInterface $before

Return Value

int