Package com.parse
Class Parse.Configuration.Builder
- java.lang.Object
-
- com.parse.Parse.Configuration.Builder
-
- Enclosing class:
- Parse.Configuration
public static final class Parse.Configuration.Builder extends java.lang.ObjectAllows for simple constructing of aConfigurationobject.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MAX_KEY_VALUE_CACHE_BYTESThe default maximum number of bytes to use for the Parse cache on disk.static intDEFAULT_MAX_KEY_VALUE_CACHE_FILESThe default maximum number of files to store in the Parse cache on disk.
-
Constructor Summary
Constructors Constructor Description Builder(Context context)Initialize a bulider with a given context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Parse.Configuration.BuilderallowCustomObjectId()Allow to set a custom objectId for ParseObjects.Parse.Configuration.BuilderapplicationId(java.lang.String applicationId)Set the application id to be used by Parse.Parse.Configurationbuild()Construct this builder into a concreteConfigurationinstance.Parse.Configuration.BuilderclientBuilder(OkHttpClient.Builder builder)Set theokhttp3.OkHttpClient.Builderto use when communicating with the Parse REST APIParse.Configuration.BuilderclientKey(java.lang.String clientKey)Set the client key to be used by Parse.Parse.Configuration.BuilderenableLocalDataStore()Enable pinning in your application.Parse.Configuration.BuildermaxKeyValueCacheBytes(int maxKeyValueCacheBytes)Set the maximum amount of bytes to use for the Parse cache on disk.Parse.Configuration.BuildermaxKeyValueCacheFiles(int maxKeyValueCacheFiles)Set the maximum number of files to store in the Parse cache on disk.Parse.Configuration.BuildermaxRetries(int maxRetries)Set the max number of times to retry Parse operations before deeming them a failureParse.Configuration.Builderserver(java.lang.String server)Set the server URL to be used by Parse.
-
-
-
Field Detail
-
DEFAULT_MAX_KEY_VALUE_CACHE_BYTES
public static final int DEFAULT_MAX_KEY_VALUE_CACHE_BYTES
The default maximum number of bytes to use for the Parse cache on disk.- See Also:
- Constant Field Values
-
DEFAULT_MAX_KEY_VALUE_CACHE_FILES
public static final int DEFAULT_MAX_KEY_VALUE_CACHE_FILES
The default maximum number of files to store in the Parse cache on disk.- See Also:
- Constant Field Values
-
-
Method Detail
-
applicationId
public Parse.Configuration.Builder applicationId(java.lang.String applicationId)
Set the application id to be used by Parse.- Parameters:
applicationId- The application id to set.- Returns:
- The same builder, for easy chaining.
-
clientKey
public Parse.Configuration.Builder clientKey(java.lang.String clientKey)
Set the client key to be used by Parse.- Parameters:
clientKey- The client key to set.- Returns:
- The same builder, for easy chaining.
-
server
public Parse.Configuration.Builder server(java.lang.String server)
Set the server URL to be used by Parse.- Parameters:
server- The server URL to set.- Returns:
- The same builder, for easy chaining.
-
enableLocalDataStore
public Parse.Configuration.Builder enableLocalDataStore()
Enable pinning in your application. This must be called before your application can use pinning.- Returns:
- The same builder, for easy chaining.
-
allowCustomObjectId
public Parse.Configuration.Builder allowCustomObjectId()
Allow to set a custom objectId for ParseObjects.- Returns:
- The same builder, for easy chaining.
-
clientBuilder
public Parse.Configuration.Builder clientBuilder(OkHttpClient.Builder builder)
Set theokhttp3.OkHttpClient.Builderto use when communicating with the Parse REST API- Parameters:
builder- The client builder, which will be modified for compatibility- Returns:
- The same builder, for easy chaining.
-
maxRetries
public Parse.Configuration.Builder maxRetries(int maxRetries)
Set the max number of times to retry Parse operations before deeming them a failure- Parameters:
maxRetries- The maximum number of times to retry. <=0 to never retry commands- Returns:
- The same builder, for easy chaining.
-
maxKeyValueCacheBytes
public Parse.Configuration.Builder maxKeyValueCacheBytes(int maxKeyValueCacheBytes)
Set the maximum amount of bytes to use for the Parse cache on disk. Defaults toDEFAULT_MAX_KEY_VALUE_CACHE_BYTES.- Parameters:
maxKeyValueCacheBytes- The maximum number of bytes to use for the cache.- Returns:
- The same builder, for easy chaining.
-
maxKeyValueCacheFiles
public Parse.Configuration.Builder maxKeyValueCacheFiles(int maxKeyValueCacheFiles)
Set the maximum number of files to store in the Parse cache on disk. Defaults toDEFAULT_MAX_KEY_VALUE_CACHE_FILES.- Parameters:
maxKeyValueCacheFiles- The maximum number of files to store in the cache.- Returns:
- The same builder, for easy chaining.
-
build
public Parse.Configuration build()
Construct this builder into a concreteConfigurationinstance.- Returns:
- A constructed
Configurationobject.
-
-