org.apache.ignite.spi.collision

## Interface CollisionContext

-     public interface CollisionContext

  Context for resolving collisions. This context contains collections of waiting jobs, active jobs, and held jobs. If continuations are not used (see `ComputeJobContinuation`), then collection of held jobs will always be empty. `CollisionSpi` will manipulate these lists to make sure that only allowed number of jobs are running in parallel or waiting to be executed.
  Since:
    3.5

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Collection<CollisionJobContext>` | `activeJobs()` Gets ordered collection of collision contexts for jobs that are currently executing.
    `Collection<CollisionJobContext>` | `heldJobs()` Gets collection of jobs that are currently in `held` state.
    `Collection<CollisionJobContext>` | `waitingJobs()` Gets ordered collection of collision contexts for jobs that are currently waiting for execution.

- - ### Method Detail

    - #### activeJobs

          Collection<CollisionJobContext> activeJobs()

      Gets ordered collection of collision contexts for jobs that are currently executing. It can be empty but never `null`.
      Returns:
        Ordered number of collision contexts for currently executing jobs.

    - #### waitingJobs

          Collection<CollisionJobContext> waitingJobs()

      Gets ordered collection of collision contexts for jobs that are currently waiting for execution. It can be empty but never `null`. Note that a newly arrived job, if any, will always be represented by the last item in this list.

      This list is guaranteed not to change while `CollisionSpi.onCollision(CollisionContext)` method is being executed.

      Returns:
        Ordered collection of collision contexts for waiting jobs.

    - #### heldJobs

          Collection<CollisionJobContext> heldJobs()

      Gets collection of jobs that are currently in `held` state. Job can enter `held` state by calling `ComputeJobContinuation.holdcc()` method at which point job will release all resources and will get suspended. If `job continuations` are not used, then this list will always be empty, but never `null`.
      Returns:
        Collection of jobs that are currently in `held` state.

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022