Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InternalSessionLocks

The internal session lock feature

Hierarchy

  • InternalSessionLocks

Index

Constructors

constructor

  • Create a new InternalSessionLocks implementation

    Parameters

    • internal: InternalSession

      the internal session

    • internalFsm: FSM

      the finite state machine of the internal session

    Returns InternalSessionLocks

Properties

Private Readonly ACQUIRE_SESSION_LOCK

The service command to acquire a session lock

Private Readonly RELEASE_SESSION_LOCK

RELEASE_SESSION_LOCK: ServiceSender<SessionLockAcquisition, boolean>

The service command to release a session lock

Private locks

locks: {}

The map of locks indexed by their name

Type declaration

Private nextRequestId

nextRequestId: number = 0

The next request id

Private Readonly serviceLocator

serviceLocator: ServiceLocator

The service locator

Methods

Private createLock

handleAcquisistion

  • Handle a lock acquisition

    Parameters

    Returns SessionLock

    the new session lock

lock

  • Attempt to acquire a lock

    If a lock with the name is already owned by the session, the existing lock will be returned. Otherwise a request will be sent to the server

    Parameters

    Returns Promise<SessionLock>

    a Promise that resolves with the acquired session lock

unlock

  • Unlock a session lock identified by the acquisition details

    Parameters

    Returns Promise<boolean>

Copyright © 2025 DiffusionData Ltd. All Rights Reserved.