22.222. Class SessionLifeCycleHelper
Namespace: ArmoniK.Core.Common.Storage
Assembly: ArmoniK.Core.Common.dll
Helper to manage sessions
public static class SessionLifeCycleHelper
22.222.1. Inheritance
22.222.2. Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
22.222.3. Methods
22.222.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)
22.222.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
22.222.3.1.2. Returns
The ID of the created session
22.222.3.1.3. Exceptions
when the partition is not found