Drupal 8  8.0.2
BatchMemory Class Reference
Inheritance diagram for BatchMemory:

Public Member Functions

 claimItem ($lease_time=0)
 
 getAllItems ()
 
- Public Member Functions inherited from Memory
 __construct ($name)
 
 createItem ($data)
 
 numberOfItems ()
 
 claimItem ($lease_time=30)
 
 deleteItem ($item)
 
 releaseItem ($item)
 
 createQueue ()
 
 deleteQueue ()
 

Additional Inherited Members

- Protected Attributes inherited from Memory
 $queue
 
 $idSequence
 

Detailed Description

Defines a batch queue handler used by the Batch API for non-progressive batches.

This implementation:

  • Ensures FIFO ordering.
  • Allows an item to be repeatedly claimed until it is actually deleted (no notion of lease time or 'expire' date), to allow multipass operations.

Member Function Documentation

claimItem (   $lease_time = 0)

Overrides ::claimItem().

Unlike ::claimItem(), this method provides a default lease time of 0 (no expiration) instead of 30. This allows the item to be claimed repeatedly until it is deleted.

Implements QueueInterface.

References Drupal\queue().

Here is the call graph for this function:

getAllItems ( )

Retrieves all remaining items in the queue.

This is specific to Batch API and is not part of the .

Returns
array An array of queue items.

References Drupal\queue().

Here is the call graph for this function:


The documentation for this class was generated from the following file: