AppSearchDocumentClassMap


@AnyThread
abstract class AppSearchDocumentClassMap


A class that maintains the map from schema type names to the fully qualified names of the corresponding document classes.

Summary

Public constructors

Public functions

java-static (Mutable)Map<String!, (Mutable)List<String!>!>

Returns the global map that includes all AppSearch document classes annotated with Document that are available in the current runtime.

Protected functions

abstract (Mutable)Map<String!, (Mutable)List<String!>!>

Returns the map from schema type names to the list of the fully qualified names of the corresponding document classes.

Public constructors

AppSearchDocumentClassMap

Added in 1.1.0-alpha07
AppSearchDocumentClassMap()

Public functions

getGlobalMap

Added in 1.1.0-alpha07
@WorkerThread
java-static fun getGlobalMap(): (Mutable)Map<String!, (Mutable)List<String!>!>

Returns the global map that includes all AppSearch document classes annotated with Document that are available in the current runtime. It maps from AppSearch's type name specified by name to the list of the fully qualified names of the corresponding document classes. The values are lists because it is possible that two document classes are associated with the same AppSearch type name.

Note that although this method, under normal circumstances, executes quickly, it performs a synchronous disk read operation in order to build the map, which means it can potentially introduce I/O blocking if executed on the main thread.

Since every call to this method should return the same map, the value of this map will be internally cached, so that only the first call will perform disk I/O.

Protected functions

getMap

Added in 1.1.0-alpha07
protected abstract fun getMap(): (Mutable)Map<String!, (Mutable)List<String!>!>

Returns the map from schema type names to the list of the fully qualified names of the corresponding document classes.