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(); }