Skip to content

Class: PartialLock ​

Defined in: netconf/src/operations/partial-lock.ts:231

A partial lock this session holds. await using lock = … releases it on scope exit.

Implements ​

  • AsyncDisposable

Properties ​

lockedNodes ​

ts
readonly lockedNodes: readonly string[];

Defined in: netconf/src/operations/partial-lock.ts:239

The nodes the server locked, as RFC 7951 instance-identifiers with module names in place of the server's prefixes: /ietf-interfaces:interfaces/interface[name='eth0'].


lockId ​

ts
readonly lockId: number;

Defined in: netconf/src/operations/partial-lock.ts:233

The lock's id, used to release it.

Accessors ​

state ​

Get Signature ​

ts
get state(): PartialLockState;

Defined in: netconf/src/operations/partial-lock.ts:261

  • held: the lock is in place
  • unlocked: released by unlock() or dispose
  • closed: the session ended, which released it on the server
Returns ​

PartialLockState

Methods ​

[asyncDispose]() ​

ts
[asyncDispose](): Promise<void>;

Defined in: netconf/src/operations/partial-lock.ts:289

Unlock if still held, ignoring the caller's AbortSignal.

Returns ​

Promise<void>

Implementation of ​

AsyncDisposable.[asyncDispose]


unlock() ​

ts
unlock(options?): Promise<void>;

Defined in: netconf/src/operations/partial-lock.ts:269

Send <partial-unlock>. Does nothing once the lock is released or the session has closed, and shares the request with an unlock in progress.

Parameters ​

options? ​

RpcOptions = {}

Returns ​

Promise<void>

Released under the MIT Licence.