Class

SyncronousLock

SyncronousLock(counteropt, onBeginopt, onEndopt)

Constructor

# new SyncronousLock(counteropt, onBeginopt, onEndopt)

Simple Synchronous Lock implementation

Parameters:
Name Type Attributes Description
counter number <optional>

the number of simultaneous transactions allowed. defaults to 1

onBegin function <optional>

to be called at the start of the transaction

onEnd function <optional>

to be called at the conclusion of the transaction

Implements:

View Source locks/SyncronousLock.ts, line 3

Members

Transaction

# currentTransaction Optional

Stores a reference to the currently executing transaction, allowing access to the active transaction context

Current active transaction reference

Implements:

View Source interfaces/TransactionLock.ts, line 12

Methods

# async release(erropt) → {Promise.<void>}

Releases The lock after the conclusion of a transaction

Parameters:
Name Type Attributes Description
err Error <optional>
Implements:

View Source locks/SyncronousLock.ts, line 161

Promise.<void>

# submit(transaction) → {void}

Submits a transaction to be processed

Parameters:
Name Type Description
transaction Transaction
Implements:

View Source locks/SyncronousLock.ts, line 144

void