Class SpannerAccessor
java.lang.Object
org.apache.beam.sdk.io.gcp.spanner.SpannerAccessor
- All Implemented Interfaces:
AutoCloseable
Manages lifecycle of
DatabaseClient and Spanner instances.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringInstance ID to use when connecting to an experimental host. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static SpannerAccessorgetOrCreate(SpannerConfig spannerConfig)
-
Field Details
-
EXPERIMENTAL_HOST_INSTANCE_ID
Instance ID to use when connecting to an experimental host.- See Also:
-
-
Method Details
-
getOrCreate
-
getDatabaseClient
-
getBatchClient
-
getDatabaseAdminClient
-
getInstanceConfigId
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-