LocalStorage.SearchContext
public final class LocalStorage.SearchContext
Contains information about how to create the search session.
Summary
Nested types |
|---|
public final class LocalStorage.SearchContext.BuilderBuilder for |
Public methods |
|
|---|---|
@NonNull Context |
Returns the |
@NonNull String |
Returns the name of the database to create or open. |
@NonNull Executor |
Returns the worker executor associated with |
Public methods
getContext
public @NonNull Context getContext()
Returns the Context associated with the AppSearchSession
getDatabaseName
public @NonNull String getDatabaseName()
Returns the name of the database to create or open.
getWorkerExecutor
public @NonNull Executor getWorkerExecutor()
Returns the worker executor associated with AppSearchSession.
If an executor is not provided to Builder, the AppSearch default executor will be returned. You should never cast the executor to java.util.concurrent.ExecutorService and call shutdownNow. It will cancel the futures it's returned. And since execute won't return anything, we will hang forever waiting for the execution.