PlatformStorage.GlobalSearchContext

public static final class PlatformStorage.GlobalSearchContext
extends Object

java.lang.Object
   ↳ androidx.appsearch.platformstorage.PlatformStorage.GlobalSearchContext


Contains information relevant to creating a global search session.

Summary

Nested classes

class PlatformStorage.GlobalSearchContext.Builder

Builder for PlatformStorage.GlobalSearchContext objects. 

Public methods

Executor getWorkerExecutor()

Returns the worker executor associated with GlobalSearchSession.

Inherited methods

Public methods

getWorkerExecutor

public Executor getWorkerExecutor ()

Returns the worker executor associated with GlobalSearchSession.

If an executor is not provided to PlatformStorage.GlobalSearchContext.Builder, the AppSearch default executor will be returned. You should never cast the executor to ExecutorService and call ExecutorService.shutdownNow(). It will cancel the futures it's returned. And since Executor.execute(Runnable) won't return anything, we will hang forever waiting for the execution.

Returns
Executor