A Builder for creating FirebaseFirestoreSettings
.
Public Constructor Summary
FirebaseFirestoreSettings.Builder()
Constructs a new
FirebaseFirestoreSettings Builder object.
|
|
FirebaseFirestoreSettings.Builder(FirebaseFirestoreSettings
settings)
Constructs a new
FirebaseFirestoreSettings Builder based on an
existing FirebaseFirestoreSettings object.
|
Public Method Summary
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.
|
Inherited Method Summary
Public Constructors
public FirebaseFirestoreSettings.Builder ()
Constructs a new FirebaseFirestoreSettings
Builder object.
public FirebaseFirestoreSettings.Builder (FirebaseFirestoreSettings settings)
Constructs a new FirebaseFirestoreSettings
Builder based on an existing
FirebaseFirestoreSettings
object.
Public Methods
public FirebaseFirestoreSettings build ()
public long getCacheSizeBytes ()
Returns
- cache size for on-disk data.
public String getHost ()
Returns
- the host of the Cloud Firestore backend.
public boolean isPersistenceEnabled ()
Returns
- boolean indicating whether local persistent storage is enabled or not.
public boolean isSslEnabled ()
Returns
- boolean indicating whether SSL is enabled or not.
public FirebaseFirestoreSettings.Builder setCacheSizeBytes (long value)
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.
Returns
- A settings object on which the cache size is configured as specified by the given
value
.
public FirebaseFirestoreSettings.Builder setHost (String host)
Sets the host of the Cloud Firestore backend.
Parameters
host | The host string |
---|
Returns
- A settings object with the host set.
public FirebaseFirestoreSettings.Builder setPersistenceEnabled (boolean value)
Enables or disables local persistent storage. The default is to use local persistent storage.
Returns
- A settings object that uses local persistent storage as specified by the given value.
public FirebaseFirestoreSettings.Builder setSslEnabled (boolean value)
Enables or disables SSL for communication. The default is to use SSL.
Returns
- A settings object that uses SSL as specified by the value.