Package 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 (seeComputeJobContinuation
), 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 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 inheld
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 nevernull
.- 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 nevernull
. 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 inheld
state. Job can enterheld
state by callingComputeJobContinuation.holdcc()
method at which point job will release all resources and will get suspended. Ifjob continuations
are not used, then this list will always be empty, but nevernull
.- Returns:
- Collection of jobs that are currently in
held
state.
-
-