26.287. Class GrpcSessionsService

Namespace: ArmoniK.Core.Common.gRPC.Services
Assembly: ArmoniK.Core.Common.dll

Service for handling sessions.

[Authorize(AuthenticationSchemes = "ArmoniKAuthenticationScheme")]
public class GrpcSessionsService : Sessions.SessionsBase

26.287.1. Inheritance

object ← Sessions.SessionsBase ← GrpcSessionsService

26.287.2. Inherited Members

Sessions.SessionsBase.ListSessions(ListSessionsRequest, ServerCallContext), Sessions.SessionsBase.GetSession(GetSessionRequest, ServerCallContext), Sessions.SessionsBase.CancelSession(CancelSessionRequest, ServerCallContext), Sessions.SessionsBase.CreateSession(CreateSessionRequest, ServerCallContext), Sessions.SessionsBase.PauseSession(PauseSessionRequest, ServerCallContext), Sessions.SessionsBase.ResumeSession(ResumeSessionRequest, ServerCallContext), Sessions.SessionsBase.CloseSession(CloseSessionRequest, ServerCallContext), Sessions.SessionsBase.PurgeSession(PurgeSessionRequest, ServerCallContext), Sessions.SessionsBase.DeleteSession(DeleteSessionRequest, ServerCallContext), Sessions.SessionsBase.StopSubmission(StopSubmissionRequest, ServerCallContext), object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

26.287.3. Constructors

26.287.3.1. GrpcSessionsService(ISessionTable, IPartitionTable, IObjectStorage, IResultTable, ITaskTable, IPushQueueStorage, Submitter, FunctionExecutionMetrics<GrpcSessionsService>, HttpClient, ILogger<GrpcSessionsService>)

Initializes a new instance of the class.

public GrpcSessionsService(ISessionTable sessionTable, IPartitionTable partitionTable, IObjectStorage objectStorage, IResultTable resultTable, ITaskTable taskTable, IPushQueueStorage pushQueueStorage, Submitter submitterOptions, FunctionExecutionMetrics<GrpcSessionsService> meter, HttpClient httpClient, ILogger<GrpcSessionsService> logger)

26.287.3.1.1. Parameters

sessionTable ISessionTable

The session table for managing session data.

partitionTable IPartitionTable

The partition table for managing partitions.

objectStorage IObjectStorage

The object storage for storing session-related data.

resultTable IResultTable

The result table for managing session results.

taskTable ITaskTable

The task table for managing tasks associated with sessions.

pushQueueStorage IPushQueueStorage

The interface to push tasks in the queue.

submitterOptions Submitter

The submitter options for session configuration.

meter FunctionExecutionMetrics<GrpcSessionsService>

The metrics for function execution monitoring.

httpClient HttpClient

The HTTP client for making requests to agents.

logger ILogger<GrpcSessionsService>

The logger for logging information and errors.

26.287.4. Methods

26.287.4.1. CancelSession(CancelSessionRequest, ServerCallContext)

Cancel a session by its id.

[RequiresPermission(typeof(GrpcSessionsService), "CancelSession")]
public override Task<CancelSessionResponse> CancelSession(CancelSessionRequest request, ServerCallContext context)

26.287.4.1.1. Parameters

request CancelSessionRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

26.287.4.1.2. Returns

Task<CancelSessionResponse>

The response to send back to the client (wrapped by a task).

26.287.4.2. CloseSession(CloseSessionRequest, ServerCallContext)

Close a session by its id..

[RequiresPermission(typeof(GrpcSessionsService), "CloseSession")]
public override Task<CloseSessionResponse> CloseSession(CloseSessionRequest request, ServerCallContext context)

26.287.4.2.1. Parameters

request CloseSessionRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

26.287.4.2.2. Returns

Task<CloseSessionResponse>

The response to send back to the client (wrapped by a task).

26.287.4.3. CreateSession(CreateSessionRequest, ServerCallContext)

Create a session

[RequiresPermission(typeof(GrpcSessionsService), "CreateSession")]
public override Task<CreateSessionReply> CreateSession(CreateSessionRequest request, ServerCallContext context)

26.287.4.3.1. Parameters

request CreateSessionRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

26.287.4.3.2. Returns

Task<CreateSessionReply>

The response to send back to the client (wrapped by a task).

26.287.4.4. DeleteSession(DeleteSessionRequest, ServerCallContext)

Delete a session by its id. Removes metadata from Results, Sessions and Tasks associated to the session.

[RequiresPermission(typeof(GrpcSessionsService), "DeleteSession")]
public override Task<DeleteSessionResponse> DeleteSession(DeleteSessionRequest request, ServerCallContext context)

26.287.4.4.1. Parameters

request DeleteSessionRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

26.287.4.4.2. Returns

Task<DeleteSessionResponse>

The response to send back to the client (wrapped by a task).

26.287.4.5. GetSession(GetSessionRequest, ServerCallContext)

Get a session by its id.

[RequiresPermission(typeof(GrpcSessionsService), "GetSession")]
public override Task<GetSessionResponse> GetSession(GetSessionRequest request, ServerCallContext context)

26.287.4.5.1. Parameters

request GetSessionRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

26.287.4.5.2. Returns

Task<GetSessionResponse>

The response to send back to the client (wrapped by a task).

26.287.4.6. ListSessions(ListSessionsRequest, ServerCallContext)

Get a sessions list using pagination, filters and sorting.

[RequiresPermission(typeof(GrpcSessionsService), "ListSessions")]
public override Task<ListSessionsResponse> ListSessions(ListSessionsRequest request, ServerCallContext context)

26.287.4.6.1. Parameters

request ListSessionsRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

26.287.4.6.2. Returns

Task<ListSessionsResponse>

The response to send back to the client (wrapped by a task).

26.287.4.7. PauseSession(PauseSessionRequest, ServerCallContext)

Pause a session by its id.

[RequiresPermission(typeof(GrpcSessionsService), "PauseSession")]
public override Task<PauseSessionResponse> PauseSession(PauseSessionRequest request, ServerCallContext context)

26.287.4.7.1. Parameters

request PauseSessionRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

26.287.4.7.2. Returns

Task<PauseSessionResponse>

The response to send back to the client (wrapped by a task).

26.287.4.8. PurgeSession(PurgeSessionRequest, ServerCallContext)

Purge a session by its id. Removes Results data.

[RequiresPermission(typeof(GrpcSessionsService), "PurgeSession")]
public override Task<PurgeSessionResponse> PurgeSession(PurgeSessionRequest request, ServerCallContext context)

26.287.4.8.1. Parameters

request PurgeSessionRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

26.287.4.8.2. Returns

Task<PurgeSessionResponse>

The response to send back to the client (wrapped by a task).

26.287.4.9. ResumeSession(ResumeSessionRequest, ServerCallContext)

Resume a paused session by its id.

[RequiresPermission(typeof(GrpcSessionsService), "ResumeSession")]
public override Task<ResumeSessionResponse> ResumeSession(ResumeSessionRequest request, ServerCallContext context)

26.287.4.9.1. Parameters

request ResumeSessionRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

26.287.4.9.2. Returns

Task<ResumeSessionResponse>

The response to send back to the client (wrapped by a task).

26.287.4.10. StopSubmission(StopSubmissionRequest, ServerCallContext)

Stops clients and/or workers from submitting new tasks in the given session.

[RequiresPermission(typeof(GrpcSessionsService), "StopSubmission")]
public override Task<StopSubmissionResponse> StopSubmission(StopSubmissionRequest request, ServerCallContext context)

26.287.4.10.1. Parameters

request StopSubmissionRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

26.287.4.10.2. Returns

Task<StopSubmissionResponse>

The response to send back to the client (wrapped by a task).