Repository
A Repository manages a persistent IndexedFile of compiled modules.
**Metadata:**
1. #modules
2. For each module,
2.a. 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) (serialized fast-load information)
3. recordNumberOfBlockPhrases (long) (serialized tuple of phrases)
4. recordNumberOfManifest (long) [ManifestRecord]
5. recordNumberOfStyling (long) [StylingRecord]
6. recordNumberOfPhrasePaths (long) [PhrasePathRecord]
7. recordNumberOfNamesIndex (long) [NamesIndex]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.
Types
A Map which discards the oldest entry whenever an attempt is made to store more than the maximumSize elements in it.
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.