public class SpannerPool extends Object
Spannerinstances needed by JDBC connections.
When a JDBC connection is opened for a Google Cloud Spanner database, a
can be opened in the background. The
SpannerPool keeps track of which
objects have been opened by connections during the lifetime of the JVM, which connections are
still opened and closed, and which
Spanner objects could be closed.
Call the method
closeSpannerPool() at the end of your application to
gracefully shutdown all instances in the pool.
public static void closeSpannerPool()
Spannerinstances that have been opened by connections and that are still open. Call this method at the end of your application to gracefully close all
Spannerinstances in the pool. Failing to call this method will keep your application running for 60 seconds after you close the last
Connectionto Cloud Spanner, as this is the default timeout before the
SpannerPoolcloses the unused
Copyright © 2019 Google LLC. All rights reserved.