@Override public String getQueryEngineConfiguration() { return databaseAccount.get("queryEngineConfiguration").toString(); } }
public static boolean isEnableMultipleWriteLocations(DatabaseAccount account) { return account.isEnableMultipleWriteLocations(); }
/** * Constructor. */ DatabaseAccount() { this.setSelfLink(""); }
/** * Invoked when {@link DatabaseAccount} is read * @param databaseAccount Read DatabaseAccount */ public void onDatabaseAccountRead(DatabaseAccount databaseAccount) { this.updateLocationCache( databaseAccount.getWritableLocations(), databaseAccount.getReadableLocations(), null, BridgeInternal.isEnableMultipleWriteLocations(databaseAccount)); }
public static DatabaseAccount toDatabaseAccount(RxDocumentServiceResponse response) { DatabaseAccount account = response.getResource(DatabaseAccount.class); // read the headers and set to the account Map<String, String> responseHeader = response.getResponseHeaders(); account.setMaxMediaStorageUsageInMB( Long.valueOf(responseHeader.get(HttpConstants.HttpHeaders.MAX_MEDIA_STORAGE_USAGE_IN_MB))); account.setMediaStorageUsageInMB( Long.valueOf(responseHeader.get(HttpConstants.HttpHeaders.CURRENT_MEDIA_STORAGE_USAGE_IN_MB))); return account; }
public int getMaxReplicaSetSize() { return this.databaseAccount.getReplicationPolicy().getMaxReplicaSetSize(); }
public ConsistencyLevel getStoreConsistencyPolicy() { ConsistencyLevel databaseAccountConsistency = this.databaseAccount.getConsistencyPolicy().getDefaultConsistencyLevel(); if (this.desiredConsistencyLevel == null) { return databaseAccountConsistency; } else if (!Utils.isValidConsistency(databaseAccountConsistency, this.desiredConsistencyLevel)) { throw new IllegalArgumentException(String.format( "ConsistencyLevel %1s specified in the request is invalid when service is configured with consistency level %2s. Ensure the request consistency level is not stronger than the service consistency level.", this.desiredConsistencyLevel.toString(), databaseAccountConsistency.toString())); } else { return this.desiredConsistencyLevel; } }