PlatformStorage.GlobalSearchContext

public final class PlatformStorage.GlobalSearchContext


Contains information relevant to creating a global search session.

Summary

Nested types

Builder for GlobalSearchContext objects.

Public methods

@NonNull Executor

Returns the worker executor associated with GlobalSearchSession.

Public methods

getWorkerExecutor

Added in 1.1.0-alpha04
public @NonNull Executor getWorkerExecutor()

Returns the worker executor associated with GlobalSearchSession.

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.