A Builder for creating FirebaseFirestoreSettings.
|
FirebaseFirestoreSettings.Builder()
Constructs a new
FirebaseFirestoreSettings Builder object. |
|
|
FirebaseFirestoreSettings.Builder(FirebaseFirestoreSettings settings)
Constructs a new
FirebaseFirestoreSettings Builder based on an existing FirebaseFirestoreSettings object. |
| FirebaseFirestoreSettings |
build()
|
| long | |
| String |
getHost()
|
| boolean | |
| boolean | |
| FirebaseFirestoreSettings.Builder |
setCacheSizeBytes(long value)
Sets an approximate cache size threshold for the on-disk data.
|
| FirebaseFirestoreSettings.Builder | |
| FirebaseFirestoreSettings.Builder |
setPersistenceEnabled(boolean value)
Enables or disables local persistent storage.
|
| FirebaseFirestoreSettings.Builder |
setSslEnabled(boolean value)
Enables or disables SSL for communication.
|
| FirebaseFirestoreSettings.Builder |
setTimestampsInSnapshotsEnabled(boolean value)
This method was deprecated.
This setting now defaults to true and will be removed in a future release. If you
are already setting it to true, just remove the setting. If you are setting it to false,
you should update your code to expect
Timestamps
instead of Dates and then remove the setting.
|
Constructs a new FirebaseFirestoreSettings Builder object.
Constructs a new FirebaseFirestoreSettings Builder based on an existing FirebaseFirestoreSettings object.
| settings |
|---|
Sets an approximate cache size threshold for the on-disk data. If the cache grows beyond this size, Cloud Firestore will start removing data that hasn't been recently used. The size is not a guarantee that the cache will stay below that size, only that if the cache exceeds the given size, cleanup will be attempted.
By default, collection is enabled with a cache size of 100 MB. The minimum value is 1 MB.
| value |
|---|
value.
Sets the host of the Cloud Firestore backend.
| host | The host string |
|---|
Enables or disables local persistent storage. The default is to use local persistent storage.
| value |
|---|
Enables or disables SSL for communication. The default is to use SSL.
| value |
|---|
This method was deprecated.
This setting now defaults to true and will be removed in a future release. If you
are already setting it to true, just remove the setting. If you are setting it to false,
you should update your code to expect Timestamps
instead of Dates and then remove the setting.
Specifies whether to use Timestamps for timestamp
fields in DocumentSnapshots. This is now enabled by default and
should not be disabled.
Previously, Cloud Firestore returned timestamp fields as Date but Date only supports millisecond precision, which leads to truncation and causes
unexpected behavior when using a timestamp from a snapshot as a part of a subsequent query.
So now Cloud Firestore returns Timestamp values
instead of Date, avoiding this kind of problem.
To opt into the old behavior of returning Dates, you can
temporarily set areTimestampsInSnapshotsEnabled() to false.
| value |
|---|