Firestore.Options

public static class: Firestore.Options
extends Object
java.lang.Object
   ↳ com.google.firebase.firestore.Firestore.Options

Class Overview

An options object used to configure Firestore.

Summary

Public Constructors
Firestore.Options(String projectId)
Constructs an options object that points to the given projectId
Firestore.Options(String projectId, FirebaseApp app)
Constructs an options object that points to the given projectId Only used for tests.
Public Methods
Firestore.Options disableClientSideQueries()
Disables firestoreClient side queries.
Firestore.Options disableSSL()
Disables ssl for communication.
Firestore.Options enableClientSideQueries()
Enables firestoreClient side queries.
Firestore.Options enableSSL()
Enable ssl for communication.
Firestore.Options setCallbackExecutor(Executor executor)
Set the executor on which all callbacks should be called.
Firestore.Options setFirebaseApp(FirebaseApp firebaseApp)
Overrides the FirebaseApp to use.
Firestore.Options setHost(String host)
The host of the Firestore backend.
Inherited Methods
From class java.lang.Object

Public Constructors

public Firestore.Options (String projectId)

Constructs an options object that points to the given projectId

Parameters
projectId String: The Google Cloud ProjectId to use.

public Firestore.Options (String projectId, FirebaseApp app)

Constructs an options object that points to the given projectId Only used for tests.

Parameters
projectId String: The Google Cloud ProjectId to use.
app FirebaseApp: The FirebaseApp to use. This can be null, which will result in unathenticated access to Firestore.

Public Methods

public Firestore.Options disableClientSideQueries ()

Disables firestoreClient side queries. The default is to not use firestoreClient side queries.

Returns
Firestore.Options An options object with firestoreClient side queries disabled.

public Firestore.Options disableSSL ()

Disables ssl for communication. The default is to use SSL

Returns
Firestore.Options An option object with ssl disabled.

public Firestore.Options enableClientSideQueries ()

Enables firestoreClient side queries. The default is to not use firestoreClient side queries.

Warning: Client side queries will drastically affect performance and should never be used in production or on large collections.

Returns
Firestore.Options An options object with firestoreClient side queries enabled.

public Firestore.Options enableSSL ()

Enable ssl for communication. The default is to use SSL

Returns
Firestore.Options An option object with ssl enabled.

public Firestore.Options setCallbackExecutor (Executor executor)

Set the executor on which all callbacks should be called. The default executor is an executor that schedules all callbacks on the main thread.

Parameters
executor Executor: The executor on which callbacks will be called.
Returns
Firestore.Options An option object with the executor set.

public Firestore.Options setFirebaseApp (FirebaseApp firebaseApp)

Overrides the FirebaseApp to use. If this is not specified, the default FirebaseApp will be used.

Parameters
firebaseApp FirebaseApp: The app to use.
Returns
Firestore.Options An option object with the firebaseApp set.

public Firestore.Options setHost (String host)

The host of the Firestore backend.

Parameters
host String: The host string
Returns
Firestore.Options An option object with the host set.

Send feedback about...

Need help? Visit our support page.