Package com.google.cloud.spanner
Class DatabaseInfo
- java.lang.Object
-
- com.google.cloud.spanner.DatabaseInfo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDatabaseInfo.Builderstatic classDatabaseInfo.StateState of the database.
-
Constructor Summary
Constructors Constructor Description DatabaseInfo(DatabaseId id, DatabaseInfo.State state)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)com.google.cloud.TimestampgetCreateTime()Returns the creation time of the database.StringgetDefaultLeader()The read-write region which contains the database's leader replicas.DialectgetDialect()The dialect that is used by the database.com.google.cloud.TimestampgetEarliestVersionTime()Returns the earliest version time of the database.CustomerManagedEncryptiongetEncryptionConfig()Returns theCustomerManagedEncryptionof the database if the database is encrypted, ornullif this database is not encrypted.DatabaseIdgetId()Returns the database id.DatabasegetProto()Returns the raw proto instance that was used to construct thisDatabase.RestoreInfogetRestoreInfo()Returns theRestoreInfoof the database if any is available, ornullif noRestoreInfois available for this database.DatabaseInfo.StategetState()Returns the state of the database.StringgetVersionRetentionPeriod()Returns the version retention period of the database.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
DatabaseInfo
public DatabaseInfo(DatabaseId id, DatabaseInfo.State state)
-
-
Method Detail
-
getId
public DatabaseId getId()
Returns the database id.
-
getState
public DatabaseInfo.State getState()
Returns the state of the database.
-
getCreateTime
public com.google.cloud.Timestamp getCreateTime()
Returns the creation time of the database.
-
getVersionRetentionPeriod
public String 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
@Nullable public RestoreInfo getRestoreInfo()
Returns theRestoreInfoof the database if any is available, ornullif noRestoreInfois available for this database.
-
getEncryptionConfig
@Nullable public CustomerManagedEncryption getEncryptionConfig()
Returns theCustomerManagedEncryptionof the database if the database is encrypted, ornullif this database is not encrypted.
-
getDefaultLeader
@Nullable public String 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
@Nullable public Dialect getDialect()
The dialect that is used by the database. It can be one of the values as specified inDialect.values().
-
getProto
@Nullable public Database getProto()
Returns the raw proto instance that was used to construct thisDatabase.
-
-