nl.topicus.jdbc.shaded.com.google.instrumentation.common.NonThrowingCloseable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spanner-jdbc Show documentation
Show all versions of spanner-jdbc Show documentation
JDBC Driver for Google Cloud Spanner
package nl.topicus.jdbc.shaded.com.google.instrumentation.common;
import java.io.Closeable;
/**
* An {@link Closeable} which cannot throw a checked exception.
*
* This is useful because such a reversion otherwise requires the caller to catch the
* (impossible) Exception in the try-with-resources.
*
*
Example of usage:
*
*
* try (NonThrowingAutoCloseable ctx = tryEnter()) {
* ...
* }
*
*/
public interface NonThrowingCloseable extends Closeable {
@Override
void close();
}