SqlParallel - Implement BatchQueueInterface
Before
------
Each of the `CRM_Queue_Queue_*` drivers supports a set of methods for
claiming/releasing one queue-item at a time (eg `claimItem()`,
`releaseItem()`, `deleteItem()`).
After
-----
All drivers still support the same queue-item methods. Additionally, the
`SqlParallel` driver supports batch-oriented equivalents (`claimItems()`,
`deleteItems()`, etc).
Comments
--------
I initially looked at updating all of the drivers to support queues. There
were a few obstacles. Firstly, batched-claims seem semantically
questionable for queues that run 1-by-1 (`Sql`, `Memory`). Secondly, there
are a few extensions in contrib that extend these classes and override
methods (consequently, they're looking for stable signatures).
The approach here seemed to resolve those two concerns in an OOP-safe way:
define an optional interface (`BatchQueueInterface`) which can be used to
mark enhanced functionality on queues where it makes sense (eg
`SqlParallel`).