src/java.sql/share/classes/javax/sql/CommonDataSource.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 24,35 **** */ package javax.sql; import java.sql.SQLException; - import java.io.PrintWriter; import java.sql.SQLFeatureNotSupportedException; import java.util.logging.Logger; /** * Interface that defines the methods which are common between <code>DataSource</code>, * <code>XADataSource</code> and <code>ConnectionPoolDataSource</code>. --- 24,35 ---- */ package javax.sql; import java.sql.SQLException; import java.sql.SQLFeatureNotSupportedException; + import java.sql.ShardingKeyBuilder; import java.util.logging.Logger; /** * Interface that defines the methods which are common between <code>DataSource</code>, * <code>XADataSource</code> and <code>ConnectionPoolDataSource</code>.
*** 126,131 **** --- 126,147 ---- * @throws SQLFeatureNotSupportedException if the data source does not use * {@code java.util.logging} * @since 1.7 */ public Logger getParentLogger() throws SQLFeatureNotSupportedException; + + //------------------------- JDBC 4.3 ----------------------------------- + + /** + * Creates a new {@code ShardingKeyBuilder} instance + * @implSpec + * The default implementation will throw a {@code SQLFeatureNotSupportedException}. + * @return The ShardingKeyBuilder instance that was created + * @throws SQLException if an error occurs creating the builder + * @throws SQLFeatureNotSupportedException if the driver does not support this method + * @since 9 + * @see ShardingKeyBuilder + */ + default ShardingKeyBuilder createShardingKeyBuilder() throws SQLException { + throw new SQLFeatureNotSupportedException("createShardingKeyBuilder not implemented"); + }; }