Interface IRepositoryProvider

All Known Subinterfaces:
CDORestRepositoryProvider
All Known Implementing Classes:
ContainerRepositoryProvider, MapRepositoryProvider, PluginRepositoryProvider
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface IRepositoryProvider
Provides CDO repositories through names understood by the provider. A name may be the repository's own name or an alias selected by the provider.
Author:
Eike Stepper
  • Method Summary

    Modifier and Type
    Method
    Description
    Resolves a repository by a name understood by this provider.
    default Set<String>
    Returns a snapshot of the names that this provider can currently use to resolve repositories.
  • Method Details

    • getRepository

      IRepository getRepository(String name)
      Resolves a repository by a name understood by this provider.
      Parameters:
      name - the repository lookup name or alias
      Returns:
      the repository associated with the name, or null if the provider has no such repository
    • getRepositoryNames

      default Set<String> getRepositoryNames()
      Returns a snapshot of the names that this provider can currently use to resolve repositories. The names are provider lookup names and may be aliases; they are not required to equal CDOCommonRepository.getName(). A name in the returned snapshot resolves through getRepository(String) when it is returned, but a dynamic provider may be changed immediately afterwards. The returned set must not change after this method returns.
      Returns:
      an immutable snapshot, which may be empty when enumeration is supported but no repositories are available
      Throws:
      UnsupportedOperationException - if this provider cannot enumerate its lookup names
      Since:
      4.27