Class DatabaseInfo (6.89.0)

publicclassDatabaseInfo

Represents a Cloud Spanner database.

Inheritance

Object > DatabaseInfo

Constructors

DatabaseInfo(DatabaseId id, DatabaseInfo.State state)

publicDatabaseInfo(DatabaseIdid,DatabaseInfo.Statestate)
Parameters
NameDescription
idDatabaseId
stateDatabaseInfo.State

Methods

equals(Object o)

publicbooleanequals(Objecto)
Parameter
NameDescription
oObject
Returns
TypeDescription
boolean
Overrides

getCreateTime()

publicTimestampgetCreateTime()

Returns the creation time of the database.

Returns
TypeDescription
com.google.cloud.Timestamp

getDefaultLeader()

publicStringgetDefaultLeader()

The read-write region which contains the database's leader replicas. If this value was not explicitly set during a create database or update database ddl operations, it will be NULL.

Returns
TypeDescription
String

getDialect()

publicDialectgetDialect()

The dialect that is used by the database. It can be one of the values as specified in Dialect#values().

Returns
TypeDescription
Dialect

getEarliestVersionTime()

publicTimestampgetEarliestVersionTime()

Returns the earliest version time of the database. This is the oldest timestamp that can be used to read old versions of the data.

Returns
TypeDescription
com.google.cloud.Timestamp

getEncryptionConfig()

publicCustomerManagedEncryptiongetEncryptionConfig()

Returns the CustomerManagedEncryption of the database if the database is encrypted, or null if this database is not encrypted.

Returns
TypeDescription
CustomerManagedEncryption

getId()

publicDatabaseIdgetId()

Returns the database id.

Returns
TypeDescription
DatabaseId

getProto()

publicDatabasegetProto()

Returns the raw proto instance that was used to construct this Database.

Returns
TypeDescription
Database

getProtoDescriptors()

publicByteStringgetProtoDescriptors()
Returns
TypeDescription
ByteString

getReconciling()

publicbooleangetReconciling()
Returns
TypeDescription
boolean

getRestoreInfo()

publicRestoreInfogetRestoreInfo()

Returns the RestoreInfo of the database if any is available, or null if no RestoreInfo is available for this database.

Returns
TypeDescription
RestoreInfo

getState()

publicDatabaseInfo.StategetState()

Returns the state of the database.

Returns
TypeDescription
DatabaseInfo.State

getVersionRetentionPeriod()

publicStringgetVersionRetentionPeriod()

Returns the version retention period of the database. This is the period for which Cloud Spanner retains all versions of data for the database. For instance, if set to 3 days, Cloud Spanner will retain data versions that are up to 3 days old.

Returns
TypeDescription
String

hashCode()

publicinthashCode()
Returns
TypeDescription
int
Overrides

isDropProtectionEnabled()

publicbooleanisDropProtectionEnabled()
Returns
TypeDescription
boolean

toString()

publicStringtoString()
Returns
TypeDescription
String
Overrides