Interface RhythmDatabaseFactory
- All Known Implementing Classes:
RhythmDatabaseFactoryImpl
public interface RhythmDatabaseFactory
A factory for a RhythmDatabase instance.
-
Method Summary
Modifier and TypeMethodDescriptionget()Get the initialized instance.static RhythmDatabaseFactoryGet the default implementation available in the global lookup or, if nothing found, return a factory which just provides the DefaultRhythmDatabase instance.Future<?> Initialize the RhythmDatabase instance.booleanCheck if the RhythmDatabase instance is initialized.
-
Method Details
-
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
RhythmDatabase get()Get the initialized instance.If initialization is not done, call initialize(). If initialization is not complete, wait for its completion.
- Returns:
-