public final class

LocalStorage.SearchContext

extends java.lang.Object

 java.lang.Object

↳androidx.appsearch.localstorage.LocalStorage.SearchContext

Overview

Contains information about how to create the search session.

Summary

Methods
public java.lang.StringgetDatabaseName()

Returns the name of the database to create or open.

public java.util.concurrent.ExecutorgetWorkerExecutor()

Returns the worker executor associated with AppSearchSession.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

public java.lang.String getDatabaseName()

Returns the name of the database to create or open.

public java.util.concurrent.Executor getWorkerExecutor()

Returns the worker executor associated with AppSearchSession.

If an executor is not provided to LocalStorage.SearchContext.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.