Interface BuildContext

All Known Subinterfaces:
WorkerBuildContext, WritableBuildContext
All Known Implementing Classes:
ImmutableSearchFactory

public interface BuildContext
Build context that can be used by some services at initialization
  • Method Details

    • getUninitializedSearchFactory

      SearchFactoryImplementor getUninitializedSearchFactory()
      Returns the SessionFactoryImplementor instance. Do not use until after the initialize and/or start method is fully executed. Implementations should not cache values provided by the SessionFactoryImplementor but rather access them each time: when the configuration is dynamically updated, new changes are available through the SearchFactoryImplementor For example, prefer void method() { int size = sfi.getDirectoryProviders().size(); } to void method() { int size = directoryProviders.size(); } where directoryProviders is a class variable.
    • getIndexingStrategy

      String getIndexingStrategy()
    • getDirectoryProviders

      Set<DirectoryProvider<?>> getDirectoryProviders()
    • getDirectoryProviderLock

      ReentrantLock getDirectoryProviderLock(DirectoryProvider<?> provider)
      This method cannot be used in initialize methods. start methods can use it though.
      Parameters:
      provider -
      Returns:
    • requestService

      <T> T requestService(Class<? extends ServiceProvider<T>> provider)
      Declare the use of a service. All callers of this method must call (@link #releaseService} or the service will not be released
      Type Parameters:
      T - class of the service
      Parameters:
      provider - of the service
      Returns:
      the service instance
    • releaseService

      void releaseService(Class<? extends ServiceProvider<?>> provider)
      Release a service from duty. Each call to (@link #requestService} should be coupled with a call to (@link #releaseService} when the service is no longer needed.
      Parameters:
      provider - of the service