=begin pod :kind("Type") :subkind("role") :category("domain-specific")

=TITLE role CompUnit::PrecompilationRepository

=SUBTITLE CompUnit::PrecompilationRepository

This class provides stubs for each of the following methods. The methods are provided by sub-classes,
such as C<PrecompilationRepository::File>. Sub-classes are implementation dependent.

=head1 Methods

=head2 method new-unit

    method new-unit(| --> CompUnit::PrecompilationUnit:D)
    { ... }

Prepare a new implementation specific PrecompilationUnit for storage

=head2 method load-unit

    method load-unit(CompUnit::PrecompilationId $compiler-id,
                CompUnit::PrecompilationId $precomp-id)
    { ... }

Load the precompilation identified by the pairing of the specified
compiler and precompilation ID.

=head2 method load-repo-id

    method load-repo-id(CompUnit::PrecompilationId $compiler-id,
                CompUnit::PrecompilationId $precomp-id)
    { ... }

Return the repository id for which the specified precomp file's
dependencies have been validated

=head2 method store-file

    method store-file(CompUnit::PrecompilationId $compiler-id,
                 CompUnit::PrecompilationId $precomp-id,
                 IO::Path:D $path,
                 :$extension = '')
    { ... }

Store the file at the specified path in the precompilation store,
under the given compiler ID and precompilation ID.

=head2 method store-unit

    method store-unit(CompUnit::PrecompilationId $compiler-id,
                 CompUnit::PrecompilationId $precomp-id,
                 CompUnit::PrecompilationUnit $unit)
    { ... }

Store the given precompilation unit in the precompilation store
under the given compiler ID and precompilation ID.

=head2 method store-repo-id

    method store-repo-id(CompUnit::PrecompilationId $compiler-id,
                 CompUnit::PrecompilationId $precomp-id,
                 :$repo-id!)
    { ... }

Store the given repo-id for a precompilation under the given
compiler ID and precompilation ID.

=head2 method delete

    method delete(CompUnit::PrecompilationId $compiler-id,
                  CompUnit::PrecompilationId $precomp-id)
    { ... }

Delete an individual precompilation.

=head2 method delete-by-compiler

    method delete-by-compiler(CompUnit::PrecompilationId $compiler-id)
    { ... }

Delete all precompilations for a particular compiler.
=end pod
