3.1.4.4.3 Refresh Lock

If the SchemaLockRequestType attribute is set to "RefreshLock", the protocol server considers this schema lock subrequest to be of type, "Refresh lock". The protocol server refreshes the client’s timeout of the shared lock on the coauthorable file.

If the refresh of the shared lock on the file for that specific client fails because the file is no longer locked since the timeout value expired on the lock, the protocol server does one of the following:

  • It the coauthoring feature is enabled on the protocol server, the server considers this a schema lock subrequest of type "Get lock" and gets a new shared lock on the file.

  • If the coauthoring feature is disabled, the protocol server returns an error code value set to "FileNotLockedOnServer".<53>

After the protocol server has ensured that there is a shared lock with the same schema lock identifier used by the current client and that the client is sharing that shared lock on the file, the protocol server MUST update the client’s timeout on the shared lock on the file. The new timeout value is the timeout value sent as part of the schema lock subrequest. If the client is sending a request to refresh the shared lock with a timeout value less than the current timeout on the shared lock, the protocol server considers the coauthoring subrequest of type "Refresh lock" as a no-operation instruction. The Timeout attribute is defined in section 2.3.1.13.

If there is a current exclusive lock on the file or if there is a shared lock on the file with a different schema lock identifier, the protocol server returns an error code value set to "FileAlreadyLockedOnServer". If the coauthorable file is checked out on the server and it is checked out by a client with a different user name than the current client, the protocol server returns an error code value set to "FileAlreadyCheckedOutOnServer".

Depending on the other types of errors, an implementation-dependent error code is returned by the protocol server. LockAndCoauthRelatedErrorCodeTypes is defined in section 2.2.5.8, and generic error code types are defined in section 2.2.5.6. For other unknown error types, the protocol server returns an error code value set to "LockRequestFail".