boolean acquire_lock( in String lock_name, in long duration_sec, in String comment );
|lock_name||String||Name of the lock. It can be arbitrary name, the lock is identified by this name.|
|duration_sec||long||Time for how long the system should keep the lock. The lock will be automatically released when duration time is over.|
|comment||String||Additional user oriented information about this lock.|
|boolean||true if lock was successfully acquired, false otherwise.|
|Common::AccessDenied||Raised if the client credentials are not valid.|
|Common::InvalidArgument||Raised if one of the arguments is invalid.|
|Common::OperationFailed||Raised if an operation error occurs.|
The links to the sample code below are remnants of the old DevCentral wiki and will result in a 404 error. For best results, please copy the link text and search the codeshare directly on DevCentral.
- Ps Icontrol Concurrency - This sample application will illustrate how to use the locking mechanisms in iControl to allow you to create a multi-threaded iControl application.
The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.