public class SpannerAccessor
extends java.lang.Object
implements java.lang.AutoCloseable
DatabaseClient
and Spanner
instances.Modifier and Type | Field and Description |
---|---|
static org.threeten.bp.Duration |
GRPC_KEEP_ALIVE_SECONDS |
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() |
static SpannerAccessor |
getOrCreate(SpannerConfig spannerConfig) |
public static final org.threeten.bp.Duration GRPC_KEEP_ALIVE_SECONDS
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 void close()
close
in interface java.lang.AutoCloseable