@VisibleForTesting Write withServiceFactory(ServiceFactory<Spanner, SpannerOptions> serviceFactory) { SpannerConfig config = getSpannerConfig(); return withSpannerConfig(config.withServiceFactory(serviceFactory)); }
.apply("Wait for previous depth " + depth, Wait.on(previousComputation)) .apply( "Write mutations " + depth, SpannerIO.write().withSpannerConfig(spannerConfig)); previousComputation = result.getOutput();
/** Specifies the Cloud Spanner database. */ public Write withDatabaseId(ValueProvider<String> databaseId) { SpannerConfig config = getSpannerConfig(); return withSpannerConfig(config.withDatabaseId(databaseId)); }
/** Specifies the Cloud Spanner instance. */ public Write withInstanceId(ValueProvider<String> instanceId) { SpannerConfig config = getSpannerConfig(); return withSpannerConfig(config.withInstanceId(instanceId)); }
/** Specifies the Cloud Spanner project. */ public Write withProjectId(ValueProvider<String> projectId) { SpannerConfig config = getSpannerConfig(); return withSpannerConfig(config.withProjectId(projectId)); }
/** Specifies the Cloud Spanner host. */ public Write withHost(ValueProvider<String> host) { SpannerConfig config = getSpannerConfig(); return withSpannerConfig(config.withHost(host)); }