Class DatabaseInfo (6.58.0)

public class DatabaseInfo

Represents a Cloud Spanner database.

Inheritance

Object > DatabaseInfo

Constructors

DatabaseInfo(DatabaseId id, DatabaseInfo.State state)

public DatabaseInfo(DatabaseId id, DatabaseInfo.State state)
Parameters
NameDescription
idDatabaseId
stateDatabaseInfo.State

Methods

equals(Object o)

public boolean equals(Object o)
Parameter
NameDescription
oObject
Returns
TypeDescription
boolean
Overrides

getCreateTime()

public Timestamp getCreateTime()

Returns the creation time of the database.

Returns
TypeDescription
com.google.cloud.Timestamp

getDefaultLeader()

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 be NULL.

Returns
TypeDescription
String

getDialect()

public Dialect getDialect()

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

Returns
TypeDescription
Dialect

getEarliestVersionTime()

public 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.

Returns
TypeDescription
com.google.cloud.Timestamp

getEncryptionConfig()

public CustomerManagedEncryption getEncryptionConfig()

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

Returns
TypeDescription
CustomerManagedEncryption

getId()

public DatabaseId getId()

Returns the database id.

Returns
TypeDescription
DatabaseId

getProto()

public Database getProto()

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

Returns
TypeDescription
Database

getProtoDescriptors()

public ByteString getProtoDescriptors()
Returns
TypeDescription
ByteString

getReconciling()

public boolean getReconciling()
Returns
TypeDescription
boolean

getRestoreInfo()

public RestoreInfo getRestoreInfo()

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

Returns
TypeDescription
RestoreInfo

getState()

public DatabaseInfo.State getState()

Returns the state of the database.

Returns
TypeDescription
DatabaseInfo.State

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.

Returns
TypeDescription
String

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

isDropProtectionEnabled()

public boolean isDropProtectionEnabled()
Returns
TypeDescription
boolean

toString()

public String toString()
Returns
TypeDescription
String
Overrides