Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | namespace NewfoldLabs\WP\Module\Data\EventQueue\Queues; |
| 4 | |
| 5 | use NewfoldLabs\WP\Module\Data\Event; |
| 6 | |
| 7 | interface BatchQueueInterface { |
| 8 | |
| 9 | /** |
| 10 | * Push one or more events onto the queue |
| 11 | * |
| 12 | * @param Event[] $events |
| 13 | * |
| 14 | * @return bool |
| 15 | */ |
| 16 | public function push( array $events ); |
| 17 | |
| 18 | /** |
| 19 | * Retrieve one or more events from the queue |
| 20 | * |
| 21 | * @return Event[] |
| 22 | */ |
| 23 | public function pull( int $count ); |
| 24 | |
| 25 | /** |
| 26 | * Remove one or more events from the queue |
| 27 | * |
| 28 | * @param Event[] $events |
| 29 | * |
| 30 | * @return bool |
| 31 | */ |
| 32 | public function remove( array $events ); |
| 33 | |
| 34 | /** |
| 35 | * Reserve one or more events in the queue |
| 36 | * |
| 37 | * @param Event[] $events |
| 38 | * |
| 39 | * @return bool |
| 40 | */ |
| 41 | public function reserve( array $events ); |
| 42 | |
| 43 | /** |
| 44 | * Release one or more events back onto the queue |
| 45 | * |
| 46 | * @param Event[] $events |
| 47 | * |
| 48 | * @return bool |
| 49 | */ |
| 50 | public function release( array $events ); |
| 51 | |
| 52 | /** |
| 53 | * Count the number of events in the queue |
| 54 | * |
| 55 | * @return int |
| 56 | */ |
| 57 | public function count(); |
| 58 | } |