Repository
A Repository manages a persistent IndexedFile of compiled modules.
**Metadata:**
1. #modules
2. For each module,
2a. moduleArchive
**ModuleArchive:**
1. UTF8 rootRelativeName
2. digestCache size
3. For each cached digest,
3a. timestamp (long)
3b. digest (32 bytes)
4. #versions
5. For each version,
5a. ModuleVersionKey
5b. ModuleVersion
**ModuleVersionKey:**
1. isPackage (byte)
2. digest (32 bytes)
**ModuleVersion:**
1. moduleSize (long)
2. localImportNames size (int)
3. For each import name,
3a. UTF8 import name
4. entryPoints size (int)
5. For each entry point,
5a. UTF8 entry point name
6. compilations size (int)
7. For each compilation.
7a. ModuleCompilationKey
7b. ModuleCompilation
8. moduleHeaderRecordNumber (long)
9. stacksRecordNumber (long)
**ModuleCompilationKey:**
1. predecessorCompilationTimes length (int)
2. For each predecessor compilation time,
2a. predecessor compilation time (long)
**ModuleCompilation:**
1. compilationTime (long)
2. recordNumber (long)
3. recordNumberOfBlockPhrases (long)
4. recordNumberOfManifestEntries (long)
5. recordNumberOfStyling (long)
6. recordNumberOfPhrasePaths (long)Author
Todd L Smith
Richard Arriaga
Parameters
The name of the Avail root represented by the Repository.
The path to the indexed repository.
Throws
If an exception occurs.
Constructors
Types
A Map which discards the oldest entry whenever an attempt is made to store more than the maximumSize elements in it.
Manifest information that was collected during compilation of a module. This keeps track of where certain declarations and definitions occurred within a module during compilation, each summarized as a ModuleManifestEntry.
All information associated with a particular module name in this module, across all known versions.
Information kept in memory about a compilation of a module.
An immutable key which specifies a version of a module and its context at the time of compilation. It does not explicitly contain the ModuleVersionKey, but it includes the compilation times of the module's predecessors.
Information kept in memory about a specific version of a module file.
An immutable key which specifies a version of some module. It includes whether the module's name refers to a package (a directory), and the digest of the file's contents.
Information for efficiently navigating from any position in a module's source to the hierarchy of A_Phrases containing that position.
Styling information that was collected during compilation of a module.
Functions
Remove all compilations of the specified module. If it's a package, remove all compilations of any contained modules.
Commit the pending changes if they're more than the specified number of milliseconds old.
Construct a new ModuleCompilation, adding the serialized compiled module bytes to the repository without committing.
Look up the ModuleArchive with the specified name, creating one and adding it to my moduleMap if necessary.
Reopen the IndexedFile and reinitialize the Repository.