public final class

PlayServicesStorage.SearchContext.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.appsearch.playservicesstorage.PlayServicesStorage.SearchContext.Builder

Overview

Builder for PlayServicesStorage.SearchContext objects.

Summary

Constructors
publicBuilder(Context context, java.lang.String databaseName)

Creates a PlayServicesStorage.SearchContext.Builder instance.

Methods
public PlayServicesStorage.SearchContextbuild()

Builds a PlayServicesStorage.SearchContext instance.

public PlayServicesStorage.SearchContext.BuildersetWorkerExecutor(java.util.concurrent.Executor executor)

Sets the worker executor associated with AppSearchSession.

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

Constructors

public Builder(Context context, java.lang.String databaseName)

Creates a PlayServicesStorage.SearchContext.Builder instance.

AppSearchSession will create or open a database under the given name.

Databases with different names are fully separate with distinct schema types, namespaces, and documents.

The database name cannot contain '/'.

The database name will be visible to all system UI or third-party applications that have been granted access to any of the database's documents (for example, using SetSchemaRequest.Builder.setSchemaTypeVisibilityForPackage(String, boolean, PackageIdentifier)).

Parameters:

databaseName: The name of the database.

Methods

public PlayServicesStorage.SearchContext.Builder setWorkerExecutor(java.util.concurrent.Executor executor)

Sets the worker executor associated with AppSearchSession.

If an executor is not provided, the AppSearch default executor will be used.

Parameters:

executor: the worker executor used to run heavy background tasks.

Builds a PlayServicesStorage.SearchContext instance.