D2Manager

object D2Manager

Helper class that offers static methods to setup and initialize the D2 instance. Also, it ensures that D2 is a singleton across the application.

Functions

Link copied to clipboard

Instantiates D2 with the provided configuration. This is a blocking method. If you are using RxJava, use D2Manager.instantiateD2 instead.

Link copied to clipboard
Link copied to clipboard

Returns the D2 instance, given that it has already been initialized using the D2Manager.instantiateD2 method.

Link copied to clipboard
fun instantiateD2(d2Config: D2Configuration): Single<D2>

Instantiates D2 with the provided configuration. If you are not using RxJava, use D2Manager.blockingInstantiateD2 instead.

Link copied to clipboard

Returns if D2 has already been instantiated using the D2Manager.instantiateD2 method.

Link copied to clipboard
Link copied to clipboard
fun setCredentials(username: String, password: String)
Link copied to clipboard
fun setTestingDatabase(serverUrl: String, databaseName: String, username: String)
Link copied to clipboard
fun setTestingInsecureStore(insecureStore: InsecureStore?)
Link copied to clipboard
fun setTestingSecureStore(secureStore: SecureStore?)