org.apache.ignite.internal.processors.session

## Class GridTaskSessionProcessor

- java.lang.Object
- - org.apache.ignite.internal.processors.GridProcessorAdapter
  - - org.apache.ignite.internal.processors.session.GridTaskSessionProcessor

All Implemented Interfaces:
  GridComponent, GridProcessor

    public class GridTaskSessionProcessor
    extends GridProcessorAdapter

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.ignite.internal.GridComponent

`GridComponent.DiscoveryDataExchangeType`

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter

`ctx, diagnosticLog, log`

### Constructor Summary

Constructors
Constructor and Description
`GridTaskSessionProcessor(GridKernalContext ctx)`

### Method Summary

All Methods Instance Methods Concrete Methods

`GridTaskSessionImpl`

`createTaskSession(IgniteUuid sesId, UUID taskNodeId, String taskName, @Nullable GridDeployment dep, String taskClsName, @Nullable Collection<UUID> top, @Nullable IgnitePredicate<ClusterNode> topPred, long startTime, long endTime, Collection<ComputeJobSibling> siblings, Map<Object,Object> attrs, boolean fullSup, boolean internal, @Nullable String execName, @Nullable SecurityContext secCtx)`
Creates task session.

`@Nullable GridTaskSessionImpl` `getSession(IgniteUuid sesId)`
`void` `printMemoryStats()` Prints memory statistics (sizes of internal structures, etc.).
`boolean` `removeSession(IgniteUuid sesId)` Removes session for a given session ID.
`void` `start()` Starts session processor.
`void` `stop(boolean cancel)` Stops session processor.

### Methods inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter

`assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStop, onReconnected, toString, validateNode, validateNode`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### GridTaskSessionProcessor

    public GridTaskSessionProcessor(GridKernalContext ctx)

Parameters:
  `ctx` - Grid kernal context.

### Method Detail

#### start

    public void start()
               throws IgniteCheckedException

Starts session processor.

Specified by:
  `start` in interface `GridComponent`
Overrides:
  `start` in class `GridProcessorAdapter`
Throws:
  `IgniteCheckedException` - Throws in case of any errors.

#### stop

    public void stop(boolean cancel)
              throws IgniteCheckedException

Stops session processor.

Specified by:
  `stop` in interface `GridComponent`
Overrides:
  `stop` in class `GridProcessorAdapter`
Parameters:
  `cancel` - If `true`, then all ongoing tasks or jobs for relevant components need to be cancelled.
Throws:
  `IgniteCheckedException` - Thrown in case of any errors.

#### createTaskSession

    public GridTaskSessionImpl createTaskSession(IgniteUuid sesId,
                                                 UUID taskNodeId,
                                                 String taskName,
                                                 @Nullable
                                                 @Nullable GridDeployment dep,
                                                 String taskClsName,
                                                 @Nullable
                                                 @Nullable Collection<UUID> top,
                                                 @Nullable
                                                 @Nullable IgnitePredicate<ClusterNode> topPred,
                                                 long startTime,
                                                 long endTime,
                                                 Collection<ComputeJobSibling> siblings,
                                                 Map<Object,Object> attrs,
                                                 boolean fullSup,
                                                 boolean internal,
                                                 @Nullable
                                                 @Nullable String execName,
                                                 @Nullable
                                                 @Nullable SecurityContext secCtx)

Creates task session.

Parameters:
  `sesId` - Session ID.
  `taskNodeId` - Task node ID.
  `taskName` - Task name.
  `dep` - Deployment.
  `taskClsName` - Task class name.
  `top` - Topology.
  `topPred` - Topology predicate.
  `startTime` - Execution start time.
  `endTime` - Execution end time.
  `siblings` - Collection of siblings.
  `attrs` - Map of attributes.
  `fullSup` - `True` to enable distributed session attributes and checkpoints.
  `internal` - `True` in case of internal task.
  `execName` - Custom executor name.
  `secCtx` - Security context of the user who created the session, `null` if security is not enabled.
Returns:
  New session if one did not exist, or existing one.

#### getSession

    @Nullable
    public @Nullable GridTaskSessionImpl getSession(IgniteUuid sesId)

Parameters:
  `sesId` - Session ID.
Returns:
  Session for a given session ID.

#### removeSession

    public boolean removeSession(IgniteUuid sesId)

Removes session for a given session ID.

Parameters:
  `sesId` - ID of session to remove.
Returns:
  `True` if session was removed.

#### printMemoryStats

    public void printMemoryStats()

Prints memory statistics (sizes of internal structures, etc.). NOTE: this method is for testing and profiling purposes only.

Specified by:
  `printMemoryStats` in interface `GridComponent`
Overrides:
  `printMemoryStats` in class `GridProcessorAdapter`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023