Package com.google.cloud.spanner
Class DatabaseInfo
java.lang.Object
com.google.cloud.spanner.DatabaseInfo
- Direct Known Subclasses:
Database
Represents a Cloud Spanner database.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumRepresent an updatable field in a Cloud Spanner database.static enumState of the database. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancom.google.cloud.TimestampReturns the creation time of the database.The read-write region which contains the database's leader replicas.The dialect that is used by the database.com.google.cloud.TimestampReturns the earliest version time of the database.Returns theCustomerManagedEncryptionof the database if the database is encrypted, ornullif this database is not encrypted.getId()Returns the database id.getProto()Returns the raw proto instance that was used to construct thisDatabase.com.google.protobuf.ByteStringbooleanReturns theRestoreInfoof the database if any is available, ornullif noRestoreInfois available for this database.getState()Returns the state of the database.Returns the version retention period of the database.inthashCode()booleantoString()
-
Constructor Details
-
DatabaseInfo
-
-
Method Details
-
getId
Returns the database id. -
getState
Returns the state of the database. -
getCreateTime
public com.google.cloud.Timestamp getCreateTime()Returns the creation time of the database. -
getVersionRetentionPeriod
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. -
getEarliestVersionTime
public com.google.cloud.Timestamp getEarliestVersionTime()Returns the earliest version time of the database. This is the oldest timestamp that can be used to read old versions of the data. -
getRestoreInfo
Returns theRestoreInfoof the database if any is available, ornullif noRestoreInfois available for this database. -
getEncryptionConfig
Returns theCustomerManagedEncryptionof the database if the database is encrypted, ornullif this database is not encrypted. -
getDefaultLeader
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 beNULL. -
getDialect
The dialect that is used by the database. It can be one of the values as specified inDialect.values(). -
isDropProtectionEnabled
public boolean isDropProtectionEnabled() -
getReconciling
public boolean getReconciling() -
getProtoDescriptors
public com.google.protobuf.ByteString getProtoDescriptors() -
getProto
Returns the raw proto instance that was used to construct thisDatabase. -
equals
-
hashCode
public int hashCode() -
toString
-