Open Journal Systems
3.3.0
|
Public Member Functions | |
autoFlushAt ($threshold) | |
bufferExceptions () | |
build () | |
createBatchesWith (BatchDivisorInterface $divisorStrategy) | |
keepHistory () | |
notify ($callable) | |
transferCommands ($batchSize=50) | |
transferRequests ($batchSize=50) | |
transferWith (BatchTransferInterface $transferStrategy) | |
Static Public Member Functions | |
static | factory () |
Protected Attributes | |
$afterFlush | |
$autoFlush = false | |
$divisorStrategy | |
$exceptionBuffering = false | |
$history = false | |
$transferStrategy | |
Static Protected Attributes | |
static | $mapping |
Builder used to create custom batch objects
Definition at line 11 of file BatchBuilder.php.
Guzzle\Batch\BatchBuilder::autoFlushAt | ( | $threshold | ) |
Automatically flush the batch when the size of the queue reaches a certain threshold. Adds {
$threshold | Number of items to allow in the queue before a flush |
Definition at line 72 of file BatchBuilder.php.
Guzzle\Batch\BatchBuilder::bufferExceptions | ( | ) |
Buffer exceptions thrown during transfer so that you can transfer as much as possible, and after a transfer completes, inspect each exception that was thrown. Enables the {
Definition at line 97 of file BatchBuilder.php.
Guzzle\Batch\BatchBuilder::build | ( | ) |
Create and return the instantiated batch
RuntimeException | if no transfer strategy has been specified |
Definition at line 187 of file BatchBuilder.php.
Guzzle\Batch\BatchBuilder::createBatchesWith | ( | BatchDivisorInterface | $divisorStrategy | ) |
Specify the strategy used to divide the queue into an array of batches
BatchDivisorInterface | $divisorStrategy | Strategy used to divide a batch queue into batches |
Definition at line 160 of file BatchBuilder.php.
References Guzzle\Batch\BatchBuilder\$divisorStrategy.
|
static |
Create a new instance of the BatchBuilder
Definition at line 60 of file BatchBuilder.php.
Referenced by Guzzle\Service\Resource\ResourceIteratorApplyBatched\apply(), Guzzle\Tests\Batch\BatchBuilderTest\testDivisorStrategyMustBeSet(), Guzzle\Tests\Batch\BatchBuilderTest\testFactoryCreatesInstance(), Guzzle\Tests\Batch\BatchBuilderTest\testTransfersCommands(), Guzzle\Tests\Batch\BatchBuilderTest\testTransfersRequests(), and Guzzle\Tests\Batch\BatchBuilderTest\testTransferStrategyMustBeSet().
Guzzle\Batch\BatchBuilder::keepHistory | ( | ) |
Maintain a history of all items that have been transferred using the batch. Adds {
Definition at line 84 of file BatchBuilder.php.
Guzzle\Batch\BatchBuilder::notify | ( | $callable | ) |
Notify a callable each time a batch flush completes. Enables the {
mixed | $callable | Callable function to notify |
InvalidArgumentException | if the argument is not callable |
Definition at line 112 of file BatchBuilder.php.
Guzzle\Batch\BatchBuilder::transferCommands | ( | $batchSize = 50 | ) |
Configures the batch to transfer batches commands. Associates as {
int | $batchSize | Batch size for each batch of commands |
Definition at line 144 of file BatchBuilder.php.
References Guzzle\Batch\BatchBuilder\$transferStrategy.
Guzzle\Batch\BatchBuilder::transferRequests | ( | $batchSize = 50 | ) |
Configures the batch to transfer batches of requests. Associates a {
int | $batchSize | Batch size for each batch of requests |
Definition at line 127 of file BatchBuilder.php.
References Guzzle\Batch\BatchBuilder\$transferStrategy.
Guzzle\Batch\BatchBuilder::transferWith | ( | BatchTransferInterface | $transferStrategy | ) |
Specify the strategy used to transport the items when flush is called
BatchTransferInterface | $transferStrategy | How items are transferred |
Definition at line 174 of file BatchBuilder.php.
References Guzzle\Batch\BatchBuilder\$transferStrategy.
|
protected |
Callable to invoke each time a flush completes
Definition at line 35 of file BatchBuilder.php.
|
protected |
Whether or not the batch should automatically flush
Definition at line 17 of file BatchBuilder.php.
|
protected |
Object used to divide the queue into batches
Definition at line 47 of file BatchBuilder.php.
Referenced by Guzzle\Batch\BatchBuilder\createBatchesWith().
|
protected |
Whether or not to buffer exceptions encountered in transfer
Definition at line 29 of file BatchBuilder.php.
|
protected |
Whether or not to maintain a batch history
Definition at line 23 of file BatchBuilder.php.
|
staticprotected |
Definition at line 50 of file BatchBuilder.php.
|
protected |
Object used to transfer items in the queue
Definition at line 41 of file BatchBuilder.php.
Referenced by Guzzle\Batch\BatchBuilder\transferCommands(), Guzzle\Batch\BatchBuilder\transferRequests(), and Guzzle\Batch\BatchBuilder\transferWith().