public final class

LocalStorage.GlobalSearchContext.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.appsearch.localstorage.LocalStorage.GlobalSearchContext.Builder

Overview

Builder for LocalStorage.GlobalSearchContext objects.

Summary

Constructors
publicBuilder(Context context)

Methods
public LocalStorage.GlobalSearchContextbuild()

Builds a LocalStorage.GlobalSearchContext instance.

public LocalStorage.GlobalSearchContext.BuildersetLogger(AppSearchLogger logger)

Sets the custom logger used to get the details stats from AppSearch.

public LocalStorage.GlobalSearchContext.BuildersetWorkerExecutor(java.util.concurrent.Executor executor)

Sets the worker executor associated with GlobalSearchSession.

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

Constructors

public Builder(Context context)

Methods

public LocalStorage.GlobalSearchContext.Builder setWorkerExecutor(java.util.concurrent.Executor executor)

Sets the worker executor associated with GlobalSearchSession.

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

Parameters:

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

Sets the custom logger used to get the details stats from AppSearch.

If no logger is provided, nothing would be returned/logged. There is no default logger implementation in AppSearch.

Builds a LocalStorage.GlobalSearchContext instance.