Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace batchHelper

Index

Variables

backoffFactor: number = 2

The wait growth factor when repeatedly backing off. When backing off from an operation the first wait backoff = backoffInitial and for each consecutive wait backoff = Math.min(backoff * backoffFactor, backoffMax).

backoffInitial: number = 1000

The initial wait when backing off on request rate, in milliseconds.

backoffMax: number = 30000

The maximum wait when backing off on request rate, in milliseconds.

batchGetLimit: 100 = 100

The maximum number of items that can be got in a single request.

batchWriteLimit: 25 = 25

The maximum number of items that can be put in a single request.

Functions

  • batchGetAll(dynamodb: DynamoDB, batchGetInput: BatchGetItemInput): Promise<any[]>
  • Batch get all items in the request. Can handle more than 100 keys at once by making multiple requests. Reattempts UnprocessedKeys.

    Parameters

    • dynamodb: DynamoDB
    • batchGetInput: BatchGetItemInput

    Returns Promise<any[]>

    The stored objects.

  • batchWriteAll(dynamodb: DynamoDB, batchPutInput: BatchWriteItemInput): Promise<void>
  • Batch write all items in the request. Can handle more than 25 objects at once by making multiple requests. Reattempts UnprocessedItems.

    Parameters

    • dynamodb: DynamoDB
    • batchPutInput: BatchWriteItemInput

    Returns Promise<void>

  • configure(options: { backoffFactor?: number; backoffInitial?: number; backoffMax?: number }): void
  • Configure module settings for: backoffInitial, backoffMax, backoffFactor. See the module member for individual documentation.

    Parameters

    • options: { backoffFactor?: number; backoffInitial?: number; backoffMax?: number }

      an object with optional values for the settings

      • Optional backoffFactor?: number
      • Optional backoffInitial?: number
      • Optional backoffMax?: number

    Returns void

Generated using TypeDoc