17.217. Class SessionLifeCycleHelper

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

Helper to manage sessions

public static class SessionLifeCycleHelper

17.217.1. Inheritance

objectSessionLifeCycleHelper

17.217.2. Inherited Members

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

17.217.3. Methods

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

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

17.217.3.1.2. Returns

Task<string>

The ID of the created session

17.217.3.1.3. Exceptions

PartitionNotFoundException

when the partition is not found