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 Description GridTaskSessionProcessor(GridKernalContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GridTaskSessionImplcreateTaskSession(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 GridTaskSessionImplgetSession(IgniteUuid sesId)voidprintMemoryStats()Prints memory statistics (sizes of internal structures, etc.).booleanremoveSession(IgniteUuid sesId)Removes session for a given session ID.voidstart()Starts session processor.voidstop(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
-
-
-
-
Constructor Detail
-
GridTaskSessionProcessor
public GridTaskSessionProcessor(GridKernalContext ctx)
- Parameters:
ctx- Grid kernal context.
-
-
Method Detail
-
start
public void start() throws IgniteCheckedExceptionStarts session processor.- Specified by:
startin interfaceGridComponent- Overrides:
startin classGridProcessorAdapter- Throws:
IgniteCheckedException- Throws in case of any errors.
-
stop
public void stop(boolean cancel) throws IgniteCheckedExceptionStops session processor.- Specified by:
stopin interfaceGridComponent- Overrides:
stopin classGridProcessorAdapter- Parameters:
cancel- Iftrue, 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-Trueto enable distributed session attributes and checkpoints.internal-Truein case of internal task.execName- Custom executor name.secCtx- Security context of the user who created the session,nullif 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:
Trueif 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:
printMemoryStatsin interfaceGridComponent- Overrides:
printMemoryStatsin classGridProcessorAdapter
-
-