21.218. Class SessionLifeCycleHelper
Namespace: ArmoniK.Core.Common.Storage
Assembly: ArmoniK.Core.Common.dll
Helper to manage sessions
public static class SessionLifeCycleHelper
21.218.1. Inheritance
21.218.2. Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
21.218.3. Methods
21.218.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)
21.218.3.1.1. Parameters
sessionTable ISessionTable
Interface to manage session states
partitionTable IPartitionTable
Interface to manage partition states
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
21.218.3.1.2. Returns
The ID of the created session
21.218.3.1.3. Exceptions
when the partition is not found