Lock
A class providing a synchronisation lock
Constructor Summary
| Public Constructor | ||
| public |
constructor($q: *, $timeout: *) |
|
Method Summary
| Public Methods | ||
| public |
getLock(key: *, failOnLocked: *): * |
|
| public |
returnLock(key: *, returnData: *, resolve: *): * Returns a aquired lock |
|
Public Constructors
public constructor($q: *, $timeout: *) source
Params:
| Name | Type | Attribute | Description |
| $q | * | ||
| $timeout | * |
Public Methods
public getLock(key: *, failOnLocked: *): * source
Params:
| Name | Type | Attribute | Description |
| key | * | They key we are locking on |
|
| failOnLocked | * | Flag if the promise should immediatly reject if we are not exclusively locking |
Return:
| * |
public returnLock(key: *, returnData: *, resolve: *): * source
Returns a aquired lock
Params:
| Name | Type | Attribute | Description |
| key | * | The Key of the lock to return |
|
| returnData | * | the data to return with the resolved promise |
|
| resolve | * | If true, the promise will be resolve, if false, a rejected promise will be returns |
Return:
| * |