Lock Requests

The Lock requests will provide support to the following criteria:

  • A key identifying the lock.
  • A timeout in seconds:
    • "0", to request immediate lock, which means the lock request is either successful and grants the lock right away, or returns an error.
    • Non-zero, to request a lock that can be delayed. If the lock cannot be granted right away, it is delayed by the entity. If the entity is released before getting timed out, the lock will be granted to the requester. Otherwise, the lock request will get timed out and the request will be discarded.
  • A priority (higher the value, higher the priority). When a lock is released and there are delayed lock requests, the system will grant the lock to the request with the higher priority. If the priority value is the same for many requests then the priority placed earlier will get the lock.