From 4298f15d05fc1d0cc3590240d858b2385dad2e1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Olav=20L=C3=B8ite?= Date: Mon, 18 Mar 2019 16:08:38 +0100 Subject: [PATCH] #4685 Spanner now extends AutoCloseable (#4687) --- .../src/main/java/com/google/cloud/spanner/Spanner.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Spanner.java b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Spanner.java index fe7064d73b13..75c062f96811 100644 --- a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Spanner.java +++ b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Spanner.java @@ -24,7 +24,7 @@ * longer needed. Failure to do so may result in leaking session resources and exhausting session * quota. */ -public interface Spanner extends Service { +public interface Spanner extends Service, AutoCloseable { /** Returns a {@code DatabaseAdminClient} to do admin operations on Cloud Spanner databases. */ /* * @@ -103,5 +103,6 @@ public interface Spanner extends Service { * a hard limit on number of sessions in Cloud Spanner and not calling this method can lead to * unused sessions piling up on the backend. */ + @Override void close(); }