23.220. Class SessionLifeCycleHelper

Namespace: ArmoniK.Core.Common.Storage
Assembly: ArmoniK.Core.Common.dll

Helper to manage sessions

public static class SessionLifeCycleHelper

23.220.1. Inheritance

objectSessionLifeCycleHelper

23.220.2. Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

23.220.3. Methods

23.220.3.1. CreateSession(ISessionTable, IPartitionTable, IList<string>, TaskOptions, string, CancellationToken)

Create a session with default options for the tasks

public static Task<string> CreateSession(ISessionTable sessionTable, IPartitionTable partitionTable, IList<string> partitionIds, TaskOptions defaultTaskOptions, string defaultPartition, CancellationToken cancellationToken = default)

23.220.3.1.1. Parameters

sessionTable ISessionTable

Interface to manage session states

partitionTable IPartitionTable

Interface to manage partition states

partitionIds IList<string>

Partitions the tasks from the created session are allowed to access

defaultTaskOptions TaskOptions

Default options for the tasks in the session

defaultPartition string

Default partition for the session

cancellationToken CancellationToken

Token used to cancel the execution of the method

23.220.3.1.2. Returns

Task<string>

The ID of the created session

23.220.3.1.3. Exceptions

PartitionNotFoundException

when the partition is not found