From 40953404b9301e837628b5a85c14f802b25b7618 Mon Sep 17 00:00:00 2001 From: Olav Loite Date: Sat, 16 Mar 2019 13:50:40 +0100 Subject: [PATCH] #4685 Spanner now extends AutoCloseable --- .../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(); }