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

pull/21833/head
Damir Jelić 2019-11-13 15:39:06 +01:00
parent ab7f34b45a
commit c33f5ba0ca
1 changed files with 13 additions and 0 deletions

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.
*