API Docs for: 0.8.0
Show:

DbLockProvider Class

A lock provider that leverages the DB to create semaphores

Constructor

Item Index

Methods

Properties

Methods

acquire

(
  • name
  • [options={}]
  • cb
)

Attempts to acquire the lock with the given name.

Parameters:

  • name String
  • [options={}] Object optional
    • [payload] Object optional
    • [timeout] Integer optional

      Lock timeout in seconds

  • cb Function

get

(
  • name
  • cb
)

Retrieves the payload for the lock

Parameters:

  • name String
  • cb Function

release

(
  • name
  • [options={}]
  • cb
)

Releases the lock

Parameters:

  • name String
  • [options={}] Object optional
  • cb Function

Properties

EXPECTED_ERROR_CODE

Integer private static

LOCK_COLLECTION

String private static