Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note: time stamp is in ISO8601 format, in UTC (aka "Zulu") time zone.

TODO:  specify file locking protocol for .cacheMap file accessNote:  the file separator is "/" regardless of the platform (that means 'native' path strings on Windows must be cross-platform normalized before being written into a cache-map file.

File locking: A client must "lock" a .cacheMap file before accessing it.  Opening a file with write access does not lock it on all platforms, therefore we use the following convention, which all clients must follow:  To lock a file <filename> a client must successfully create an (empty) folder in the file's parent folder and named <filename>.lock.  (Folder creation is atomic and exclusive across platforms.  This lock folder acts as a mutex object.)  If the client is successful, it has exclusive access for ten (10) seconds from the time the lock folder is created.  When the creation time stamp is older than ten seconds, any client may delete the lock folder and the client which has created the folder is obligated to refrain from accessing <filename> unless it locks the file again.  The time limit prevents stale locks from blocking other clients.  The client creating the lock should delete the lock folder when it's done accessing <filename>.

 

File Usage Examples

In each example, we have a project in which the File will reside:

...