DatabaseAccount Class

public class DatabaseAccount
extends Resource

Represents a database account in the Azure Cosmos DB database service.

Constructor Summary

Constructor Description
DatabaseAccount(String jsonString)

Initialize a database account object from json string.

DatabaseAccount(JSONObject jsonObject)

Initialize a database account object from json object.

Method Summary

Modifier and Type Method and Description
java.lang.String getAddressesLink()

Get the addresseslink of the databaseAccount.

ConsistencyPolicy getConsistencyPolicy()

Gets the ConsistencyPolicy settings.

java.lang.String getDatabasesLink()

Get the databases link of the databaseAccount.

boolean getEnableMultipleWritableLocations()

Gets the enableMulipleWritableLocations flag of the databaseAccount.

long getMaxMediaStorageUsageInMB()

Attachment content (media) storage quota in MBs Retrieved from gateway.

java.lang.String getMediaLink()

Get the medialink of the databaseAccount.

long getMediaStorageUsageInMB()

Current attachment content (media) usage in MBs.

java.lang.Iterable<DatabaseAccountLocation> getReadableLocations()

Gets the list of readable locations for this database account.

ReplicationPolicy getReplicationPolicy()

Gets the ReplicationPolicy settings.

java.lang.Iterable<DatabaseAccountLocation> getWritableLocations()

Gets the list of writable locations for this database account.

Methods inherited from JsonSerializable

Methods inherited from Resource

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

DatabaseAccount

public DatabaseAccount(String jsonString)

Initialize a database account object from json string.

Parameters:

jsonString - the json string that represents the database account.

DatabaseAccount

public DatabaseAccount(JSONObject jsonObject)

Initialize a database account object from json object.

Parameters:

jsonObject - the json object that represents the database account.

Method Details

getAddressesLink

public String getAddressesLink()

Get the addresseslink of the databaseAccount.

Returns:

the addresses link.

getConsistencyPolicy

public ConsistencyPolicy getConsistencyPolicy()

Gets the ConsistencyPolicy settings.

Returns:

the consistency policy.

getDatabasesLink

public String getDatabasesLink()

Get the databases link of the databaseAccount.

Returns:

the databases link.

getEnableMultipleWritableLocations

public boolean getEnableMultipleWritableLocations()

Gets the enableMulipleWritableLocations flag of the databaseAccount.

Returns:

the enableMulipleWritableLocations flag value.

getMaxMediaStorageUsageInMB

public long getMaxMediaStorageUsageInMB()

Attachment content (media) storage quota in MBs Retrieved from gateway.

Returns:

the max media storage usage in MB.

getMediaLink

public String getMediaLink()

Get the medialink of the databaseAccount.

Returns:

the media link.

getMediaStorageUsageInMB

public long getMediaStorageUsageInMB()

Current attachment content (media) usage in MBs.

Retrieved from gateway. Value is returned from cached information updated periodically and is not guaranteed to be real time.

Returns:

the media storage usage in MB.

getReadableLocations

public Iterable getReadableLocations()

Gets the list of readable locations for this database account.

Returns:

the list of readable locations.

getReplicationPolicy

public ReplicationPolicy getReplicationPolicy()

Gets the ReplicationPolicy settings.

Returns:

the replication policy.

getWritableLocations

public Iterable getWritableLocations()

Gets the list of writable locations for this database account.

Returns:

the list of writable locations.

Applies to