ListLocks
|
Lists active global lock in a given group.
details
Arguments
Name
|
Description
|
Default |
name
|
The name of the lock to filter by
|
|
SQL Call
exec Threading.ListLocks
Http Call
/bsc/threading/listlocks
Output Columns
String name | The name of the active lock | String owner | Owner of the lock | Boolean expired | True/1 if the lock has expired | Double expiresIn | Number of seconds remaining before the lock expires | DateTime lockAcquiredOn | The UTC date and time when the lock was acquired | Double lockedFor | The number of seconds the lock has been acquired | String tag | Custom tag used to store system/device-specific information |
|
Lock
|
Create a global lock.
details
Arguments
Name
|
Description
|
Default |
name R
|
The name of the lock to create (use #guid() to generate a random name)
|
|
owner
|
Owner of the lock (use #guid() to generate a random owner); only the owner can unlock; leave empty if anyone can unlock
|
|
expiresInSec
|
The expiration window of the lock (default: uses the default timeout configuration setting)
|
|
tag
|
Custom tag used to store system/device-specific information
|
|
SQL Call
exec Threading.Lock 'mylock1', 60 INSERT INTO Threading.Locks (name,expiresInSec) VALUES ('mylock1', 60)
Http Call
/bsc/threading/lock
Output Columns
String name | The name of the lock to create | String owner | Owner of the lock |
|
SlideTTLLock
|
Slides the timeout window of a global lock by the specified number of seconds.
details
Arguments
Name
|
Description
|
Default |
name R
|
The name of the lock to update
|
|
owner
|
The owner of the lock
|
|
slideBySec
|
The number of seconds the expiration window should be expanded by
|
|
SQL Call
exec Threading.UpdateLock 'mylock1', 60 UPDATE Threading.Locks SET slideBySec = 60 WHERE name='mylock1'
Http Call
/bsc/threading/slidettllock
Output Columns
This call does not return data.
|
Unlock
|
Releases a global lock.
details
Arguments
Name
|
Description
|
Default |
name R
|
The name of the lock to release
|
|
owner
|
The owner of the lock
|
|
silenceErrors
|
Silence errors if the lock has already been released or is not found
|
False |
SQL Call
exec Threading.Unlock 'mylock1', 1 DELETE FROM Threading.Locks WHERE name='lock1' AND silenceErrors = 1
Http Call
/bsc/threading/unlock
Output Columns
This call does not return data.
|
UpdateTimeout
|
Updates the default Lock Timeout programmatically.
details
Arguments
Name
|
Description
|
Default |
lockTimeout R
|
The positive default lock timeout in seconds
|
|
SQL Call
exec Threading.UpdateTimeout '90'
Http Call
/bsc/threading/updatetimeout
Output Columns
This call does not return data.
|
CalculateRally
|
Calculates the number of milliseconds to wait until the next rally point.
details
Arguments
Name
|
Description
|
Default |
duration
|
Optional CRON expression indicating a rally point in the future (ex (top of the next 5 min increment): 0 */5 * ? * * ); if missing, uses the defaultSleep configuration setting if provided as a CRON expression
|
|
SQL Call
exec Threading.CalculateRally '0 */5 * ? * *'
Http Call
/bsc/threading/calculaterally
Output Columns
Double clientWaitTimeMs | The number of milliseconds to wait client-side | DateTime fromDate | The UTC datetime from which the clientWaitTimeMs has been calculated | Double fromEpoch | The epoch time (in milliseconds) from which the clientWaitTimeMs has been calculated |
|
ListSleep
|
Gets the list of systems/devices currently sleeping.
details
Arguments
SQL Call
exec Threading.ListSleep SELECT * FROM Threading.Sleep
Http Call
/bsc/threading/listsleep
Output Columns
String owner | Owner of the sleep | Double duration | Number of seconds requested for the sleep operation | Double expiresIn | Number of seconds remaining before the sleep expires | DateTime sleepAcquiredOn | The UTC date and time when the sleep was initiated | Double sleptFor | The number of seconds the sleep operation has been running | String tag | Custom tag used to store system/device-specific information |
|
Sleep
|
Sleeps the caller for N seconds.
details
Arguments
Name
|
Description
|
Default |
duration
|
The positive sleep duration in seconds OR a CRON expression indicating a rally point in the future (ex (top of the next 5 min increment): 0 */5 * ? * * )
|
|
owner
|
The owner of the sleep request
|
|
tag
|
Custom tag used to store system/device-specific information
|
|
SQL Call
exec Threading.Sleep exec Threading.Sleep '0.5'
Http Call
/bsc/threading/sleep
Output Columns
Boolean cancelled | True/1 if the operation was cancelled | Double duration | The actual sleep duration in seconds |
|
UpdateSleepDuration
|
Updates the Sleep Duration programmatically.
details
Arguments
Name
|
Description
|
Default |
duration R
|
The positive sleep duration in seconds OR a CRON expression indicating a rally point in the future (ex (top of the next 5 min increment): 0 */5 * ? * * )
|
|
SQL Call
exec Threading.UpdateSleepDuration '90' exec Threading.UpdateSleepDuration '0 */5 * ? * *'
Http Call
/bsc/threading/updatesleepduration
Output Columns
This call does not return data.
|
Wakeup
|
Wakes up sleeping processes.
details
Arguments
SQL Call
exec Threading.Wakeup
Http Call
/bsc/threading/wakeup
Output Columns
This call does not return data.
|