Interface RhythmDatabaseFactory

All Known Implementing Classes:
RhythmDatabaseFactoryImpl

public interface RhythmDatabaseFactory
A factory for a RhythmDatabase instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
    Get the initialized instance.
    Get the default implementation available in the global lookup or, if nothing found, return a factory which just provides the DefaultRhythmDatabase instance.
    Initialize the RhythmDatabase instance.
    boolean
    Check if the RhythmDatabase instance is initialized.
  • Method Details

    • getDefault

      static RhythmDatabaseFactory getDefault()
      Get the default implementation available in the global lookup or, if nothing found, return a factory which just provides the DefaultRhythmDatabase instance.
      Returns:
    • initialize

      Future<?> initialize()
      Initialize the RhythmDatabase instance.

      As the initialization can take some time (e.g. reading files), the implementation must launch a task in a different thread and return the corresponding Future so that caller can monitor completion.

      Returns:
    • isInitialized

      boolean isInitialized()
      Check if the RhythmDatabase instance is initialized.
      Returns:
    • get

      Get the initialized instance.

      If initialization is not done, call initialize(). If initialization is not complete, wait for its completion.

      Returns: