307 lines
6.6 KiB
YAML
307 lines
6.6 KiB
YAML
|
name: DynamoBatchRepository
|
||
|
class_comment: null
|
||
|
dependencies:
|
||
|
- name: DynamoDbClient
|
||
|
type: class
|
||
|
source: Aws\DynamoDb\DynamoDbClient
|
||
|
- name: Marshaler
|
||
|
type: class
|
||
|
source: Aws\DynamoDb\Marshaler
|
||
|
- name: CarbonImmutable
|
||
|
type: class
|
||
|
source: Carbon\CarbonImmutable
|
||
|
- name: Closure
|
||
|
type: class
|
||
|
source: Closure
|
||
|
- name: Str
|
||
|
type: class
|
||
|
source: Illuminate\Support\Str
|
||
|
properties:
|
||
|
- name: factory
|
||
|
visibility: protected
|
||
|
comment: '# * The batch factory instance.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var \Illuminate\Bus\BatchFactory'
|
||
|
- name: dynamoDbClient
|
||
|
visibility: protected
|
||
|
comment: '# * The database connection instance.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var \Aws\DynamoDb\DynamoDbClient'
|
||
|
- name: applicationName
|
||
|
visibility: protected
|
||
|
comment: '# * The application name.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var string'
|
||
|
- name: table
|
||
|
visibility: protected
|
||
|
comment: '# * The table to use to store batch information.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var string'
|
||
|
- name: ttl
|
||
|
visibility: protected
|
||
|
comment: '# * The time-to-live value for batch records.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var int'
|
||
|
- name: ttlAttribute
|
||
|
visibility: protected
|
||
|
comment: '# * The name of the time-to-live attribute for batch records.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var string'
|
||
|
- name: marshaler
|
||
|
visibility: protected
|
||
|
comment: '# * The DynamoDB marshaler instance.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var \Aws\DynamoDb\Marshaler'
|
||
|
methods:
|
||
|
- name: __construct
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: factory
|
||
|
- name: dynamoDbClient
|
||
|
- name: applicationName
|
||
|
- name: table
|
||
|
- name: ttl
|
||
|
- name: ttlAttribute
|
||
|
comment: "# * The batch factory instance.\n# *\n# * @var \\Illuminate\\Bus\\BatchFactory\n\
|
||
|
# */\n# protected $factory;\n# \n# /**\n# * The database connection instance.\n\
|
||
|
# *\n# * @var \\Aws\\DynamoDb\\DynamoDbClient\n# */\n# protected $dynamoDbClient;\n\
|
||
|
# \n# /**\n# * The application name.\n# *\n# * @var string\n# */\n# protected\
|
||
|
\ $applicationName;\n# \n# /**\n# * The table to use to store batch information.\n\
|
||
|
# *\n# * @var string\n# */\n# protected $table;\n# \n# /**\n# * The time-to-live\
|
||
|
\ value for batch records.\n# *\n# * @var int\n# */\n# protected $ttl;\n# \n#\
|
||
|
\ /**\n# * The name of the time-to-live attribute for batch records.\n# *\n# *\
|
||
|
\ @var string\n# */\n# protected $ttlAttribute;\n# \n# /**\n# * The DynamoDB marshaler\
|
||
|
\ instance.\n# *\n# * @var \\Aws\\DynamoDb\\Marshaler\n# */\n# protected $marshaler;\n\
|
||
|
# \n# /**\n# * Create a new batch repository instance."
|
||
|
- name: get
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: limit
|
||
|
default: '50'
|
||
|
- name: before
|
||
|
default: 'null'
|
||
|
comment: '# * Retrieve a list of batches.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param int $limit
|
||
|
|
||
|
# * @param mixed $before
|
||
|
|
||
|
# * @return \Illuminate\Bus\Batch[]'
|
||
|
- name: find
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: batchId
|
||
|
comment: '# * Retrieve information about an existing batch.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $batchId
|
||
|
|
||
|
# * @return \Illuminate\Bus\Batch|null'
|
||
|
- name: store
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: batch
|
||
|
comment: '# * Store a new pending batch.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param \Illuminate\Bus\PendingBatch $batch
|
||
|
|
||
|
# * @return \Illuminate\Bus\Batch'
|
||
|
- name: incrementTotalJobs
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: batchId
|
||
|
- name: amount
|
||
|
comment: '# * Increment the total number of jobs within the batch.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $batchId
|
||
|
|
||
|
# * @param int $amount
|
||
|
|
||
|
# * @return void'
|
||
|
- name: decrementPendingJobs
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: batchId
|
||
|
- name: jobId
|
||
|
comment: '# * Decrement the total number of pending jobs for the batch.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $batchId
|
||
|
|
||
|
# * @param string $jobId
|
||
|
|
||
|
# * @return \Illuminate\Bus\UpdatedBatchJobCounts'
|
||
|
- name: incrementFailedJobs
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: batchId
|
||
|
- name: jobId
|
||
|
comment: '# * Increment the total number of failed jobs for the batch.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $batchId
|
||
|
|
||
|
# * @param string $jobId
|
||
|
|
||
|
# * @return \Illuminate\Bus\UpdatedBatchJobCounts'
|
||
|
- name: markAsFinished
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: batchId
|
||
|
comment: '# * Mark the batch that has the given ID as finished.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $batchId
|
||
|
|
||
|
# * @return void'
|
||
|
- name: cancel
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: batchId
|
||
|
comment: '# * Cancel the batch that has the given ID.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $batchId
|
||
|
|
||
|
# * @return void'
|
||
|
- name: delete
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: batchId
|
||
|
comment: '# * Delete the batch that has the given ID.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $batchId
|
||
|
|
||
|
# * @return void'
|
||
|
- name: transaction
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: callback
|
||
|
comment: '# * Execute the given Closure within a storage specific transaction.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param \Closure $callback
|
||
|
|
||
|
# * @return mixed'
|
||
|
- name: rollBack
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Rollback the last database transaction for the connection.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return void'
|
||
|
- name: toBatch
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: batch
|
||
|
comment: '# * Convert the given raw batch to a Batch object.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param object $batch
|
||
|
|
||
|
# * @return \Illuminate\Bus\Batch'
|
||
|
- name: createAwsDynamoTable
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Create the underlying DynamoDB table.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return void'
|
||
|
- name: deleteAwsDynamoTable
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Delete the underlying DynamoDB table.'
|
||
|
- name: getExpiryTime
|
||
|
visibility: protected
|
||
|
parameters: []
|
||
|
comment: '# * Get the expiry time based on the configured time-to-live.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return string|null'
|
||
|
- name: ttlExpressionAttributeName
|
||
|
visibility: protected
|
||
|
parameters: []
|
||
|
comment: '# * Get the expression attribute name for the time-to-live attribute.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return array'
|
||
|
- name: serialize
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: value
|
||
|
comment: '# * Serialize the given value.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param mixed $value
|
||
|
|
||
|
# * @return string'
|
||
|
- name: unserialize
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: serialized
|
||
|
comment: '# * Unserialize the given value.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $serialized
|
||
|
|
||
|
# * @return mixed'
|
||
|
- name: getDynamoClient
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Get the underlying DynamoDB client instance.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return \Aws\DynamoDb\DynamoDbClient'
|
||
|
- name: getTable
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * The name of the table that contains the batch records.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return string'
|
||
|
traits:
|
||
|
- Aws\DynamoDb\DynamoDbClient
|
||
|
- Aws\DynamoDb\Marshaler
|
||
|
- Carbon\CarbonImmutable
|
||
|
- Closure
|
||
|
- Illuminate\Support\Str
|
||
|
interfaces:
|
||
|
- BatchRepository
|