30.225. Class SessionLifeCycleHelper

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

Helper to manage sessions

public static class SessionLifeCycleHelper

30.225.1. Inheritance

objectSessionLifeCycleHelper

30.225.2. Inherited Members

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

30.225.3. Methods

30.225.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)

30.225.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

30.225.3.1.2. Returns

Task<string>

The ID of the created session

30.225.3.1.3. Exceptions

PartitionNotFoundException

when the partition is not found