PriorityAggregator is used to explicitly control the scheduling priority and timeouts for execution of EntryAggregator-based methods.

For example, let's assume that there is an `Orders`` cache that belongs to a partitioned cache service configured with a *request-timeout* and *task-timeout* of 5 seconds. Also assume that we are willing to wait longer for a particular aggregation request that scans the entire cache. Then we could override the default timeout values by using the PriorityAggregator as follows:

const sumAggr = new SumAggregator('cost')
const priorityAgg = new PriorityAggregator(sumAggr)
priorityAgg.executionTimeout = Timeout.NONE
priorityAgg.requestTimeout = Timeout.NONE
cacheOrders.aggregate(aFilter, priorityAgg)

This is an advanced feature which should be used judiciously.

Type Parameters

  • K = any

    the type of the Map entry keys

  • V = any

    the type of the Map entry values

  • R = any

    the type of the final result

Hierarchy

Constructors

Properties

@class: string

Server-side EntryAggregator implementation type identifier.

aggregator: EntryAggregator<K, V, R>

The wrapped EntryAggregator.

extractor?: ValueExtractor

The ValueExtractor to apply when aggregating results.

Accessors

  • get executionTimeoutInMillis(): number
  • Return the execution timeout in milliseconds.

    Returns

    the execution timeout in milliseconds

    Returns number

  • set executionTimeoutInMillis(timeout: number): void
  • Sets the execution timeout.

    Parameters

    • timeout: number

      the new execution timeout in milliseconds

    Returns void

  • get requestTimeoutInMillis(): number
  • Return the request timeout in milliseconds.

    Returns

    the request timeout in milliseconds

    Returns number

  • set requestTimeoutInMillis(timeout: number): void
  • Sets the request timeout.

    Parameters

    • timeout: number

      the new request timeout in milliseconds

    Returns void

  • get schedulingPriority(): Schedule
  • Return the scheduling priority or, if not explicitly set, the default is STANDARD.

    Returns

    the scheduling priority, if not explicitly set, the default is STANDARD

    Returns Schedule

  • set schedulingPriority(schedulingPriority: Schedule): void
  • Set the scheduling priority.

    Parameters

    • schedulingPriority: Schedule

      the scheduling priority

    Returns void

Methods