public class SpannerAccessor
extends java.lang.Object
implements java.lang.AutoCloseable
DatabaseClient
and Spanner
instances.Modifier and Type | Method and Description |
---|---|
void |
close() |
com.google.cloud.spanner.BatchClient |
getBatchClient() |
com.google.cloud.spanner.DatabaseAdminClient |
getDatabaseAdminClient() |
com.google.cloud.spanner.DatabaseClient |
getDatabaseClient() |
java.lang.String |
getInstanceConfigId() |
static SpannerAccessor |
getOrCreate(SpannerConfig spannerConfig) |
public static SpannerAccessor getOrCreate(SpannerConfig spannerConfig)
public com.google.cloud.spanner.DatabaseClient getDatabaseClient()
public com.google.cloud.spanner.BatchClient getBatchClient()
public com.google.cloud.spanner.DatabaseAdminClient getDatabaseAdminClient()
public java.lang.String getInstanceConfigId()
public void close()
close
in interface java.lang.AutoCloseable