3.1.4.5.6 Check Lock Availability

If the ExclusiveLockRequestType attribute is set to "CheckLockAvailability", the protocol server considers this exclusive lock subrequest to be of type "Check lock availability". The protocol server checks if a file is available to take a shared lock or exclusive lock.

The protocol server returns error codes according to the following rules:

  • If there is a current exclusive lock on the file with a different exclusive lock identifier than the one specified by the current client or if there is a shared lock on the file, the protocol server returns an error code value set to "FileAlreadyLockedOnServer".

  • If the file is checked out on the server, but it is checked out by a client with a different user name than that of the current client, the protocol server returns an error code value set to "FileAlreadyCheckedOutOnServer".

  • In all other cases, the protocol server returns an error code value set to "Success" to indicate the availability of the file for locking.

  • If the protocol server encounters unknown exceptions or failures in processing the exclusive lock subrequest of type "Check lock availability", the protocol server returns an error code value that is set to "LockRequestFail".