Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IndexingCycleHandler<TDbContext, TContextData>

Central indexing component that handles special/overall cases - see its methods.

Type parameters

Hierarchy

  • IndexingCycleHandler

Index

Methods

  • afterBlockIndexed(block: Block, contextData: TContextData): void | PromiseLike<void>
  • Executed after block is already indexed, after the related database transaction is committed.

    Parameters

    • block: Block
    • contextData: TContextData

    Returns void | PromiseLike<void>

  • afterIndexersExecuted(block: Block, dbContext: TDbContext, contextData: TContextData): void | PromiseLike<void>
  • Executed after all other indexers are executed. This is an ideal place to refine your indexed data or write them to database in optimal way.

    Parameters

    • block: Block
    • dbContext: TDbContext
    • contextData: TContextData

    Returns void | PromiseLike<void>

  • beforeIndexersExecute(block: Block, dbContext: TDbContext, contextData: TContextData): void | PromiseLike<void>
  • Executed before all other indexers execute.

    Parameters

    • block: Block
    • dbContext: TDbContext
    • contextData: TContextData

    Returns void | PromiseLike<void>

  • createContextData(block: Block, dbContext: TDbContext): TContextData | PromiseLike<TContextData>
  • Creates your custom data that flows through all indexers when indexing a block. It flows in indexingContext.data or as a dedicated parameter. If not implemented, then undefined is used.

    Parameters

    • block: Block
    • dbContext: TDbContext

    Returns TContextData | PromiseLike<TContextData>

  • rollBackOnReorganization(blockToRollback: IndexedBlock, dbContext: TDbContext): void | PromiseLike<void>
  • Should roll back indexed changed on blockchain reorganization.

    Parameters

    Returns void | PromiseLike<void>

Generated using TypeDoc