API Docs for: 0.8.0
Show:

LockService Class

Constructor

LockService

(
  • [provider]
)

Parameters:

  • [provider] LockProvider optional

Item Index

Methods

Properties

Methods

acquire

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

Attempts to acquire a semaphore with the given name

Parameters:

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

get

(
  • name
  • cb
)

Retrieves the payload for the lock

Parameters:

  • name String
  • cb Function

loadProvider

() LockProvider static

Inspects the current PB configuration to determine what lock provider to instantiate and return

Returns:

LockProvider:

An instance of a media provider or NULL when no provider can be loaded.

release

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

Releases the lock

Parameters:

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

Properties

provider

MediaProvider