BaseEventIndexManager: Add a method to perform runtime checks for indexing support.

This commit is contained in:
Damir Jelić 2019-11-13 15:39:06 +01:00
parent ab7f34b45a
commit c33f5ba0ca

View File

@ -75,6 +75,19 @@ export interface HistoricEvent {
* Instances of this class are provided by the application.
*/
export default class BaseEventIndexManager {
/**
* Does our EventIndexManager support event indexing.
*
* If an EventIndexManager imlpementor has runtime dependencies that
* optionally enable event indexing they may override this method to perform
* the necessary runtime checks here.
*
* @return {Promise} A promise that will resolve to true if event indexing
* is supported, false otherwise.
*/
async supportsEventIndexing(): Promise<boolean> {
return true;
}
/**
* Initialize the event index for the given user.
*