Skip to content

Commit a85a002

Browse files
committed
Deprecate callback methods
1 parent 4966aa6 commit a85a002

File tree

23 files changed

+56
-7
lines changed

23 files changed

+56
-7
lines changed

vertx-db2-client/src/main/java/io/vertx/db2client/DB2Connection.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public interface DB2Connection extends SqlConnection {
4040
* @param connectOptions the options for the connection
4141
* @param handler the handler called with the connection or the failure
4242
*/
43+
@Deprecated
4344
static void connect(Vertx vertx, DB2ConnectOptions connectOptions, Handler<AsyncResult<DB2Connection>> handler) {
4445
Future<DB2Connection> fut = connect(vertx, connectOptions);
4546
if (handler != null) {
@@ -59,6 +60,7 @@ static Future<DB2Connection> connect(Vertx vertx, DB2ConnectOptions connectOptio
5960
* Like {@link #connect(Vertx, DB2ConnectOptions, Handler)} with options build
6061
* from {@code connectionUri}.
6162
*/
63+
@Deprecated
6264
static void connect(Vertx vertx, String connectionUri, Handler<AsyncResult<DB2Connection>> handler) {
6365
connect(vertx, fromUri(connectionUri), handler);
6466
}
@@ -72,6 +74,7 @@ static Future<DB2Connection> connect(Vertx vertx, String connectionUri) {
7274
}
7375

7476
@Override
77+
@Deprecated
7578
DB2Connection prepare(String sql, Handler<AsyncResult<PreparedStatement>> handler);
7679

7780
@Override
@@ -87,6 +90,7 @@ static Future<DB2Connection> connect(Vertx vertx, String connectionUri) {
8790
* @return a reference to this, so the API can be used fluently
8891
*/
8992
@Fluent
93+
@Deprecated
9094
DB2Connection ping(Handler<AsyncResult<Void>> handler);
9195

9296
/**
@@ -102,6 +106,7 @@ static Future<DB2Connection> connect(Vertx vertx, String connectionUri) {
102106
* @return a reference to this, so the API can be used fluently
103107
*/
104108
@Fluent
109+
@Deprecated
105110
DB2Connection debug(Handler<AsyncResult<Void>> handler);
106111

107112
/**

vertx-db2-client/src/main/java/io/vertx/db2client/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
@ModuleGen(name = "vertx-db2-client", groupPackage = "io.vertx")
16+
@ModuleGen(name = "vertx-db2-client", groupPackage = "io.vertx", checkCallbackDeprecation = true)
1717
package io.vertx.db2client;
1818

1919
import io.vertx.codegen.annotations.ModuleGen;

vertx-mssql-client/src/main/java/io/vertx/mssqlclient/MSSQLConnection.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public interface MSSQLConnection extends SqlConnection {
3636
* @param connectOptions the options for the connection
3737
* @param handler the handler called with the connection or the failure
3838
*/
39+
@Deprecated
3940
static void connect(Vertx vertx, MSSQLConnectOptions connectOptions, Handler<AsyncResult<MSSQLConnection>> handler) {
4041
Future<MSSQLConnection> fut = MSSQLConnectionImpl.connect(vertx, connectOptions);
4142
if (handler != null) {
@@ -53,6 +54,7 @@ static Future<MSSQLConnection> connect(Vertx vertx, MSSQLConnectOptions connectO
5354
/**
5455
* Like {@link #connect(Vertx, MSSQLConnectOptions, Handler)} with options built from {@code connectionUri}.
5556
*/
57+
@Deprecated
5658
static void connect(Vertx vertx, String connectionUri, Handler<AsyncResult<MSSQLConnection>> handler) {
5759
connect(vertx, fromUri(connectionUri), handler);
5860
}
@@ -69,6 +71,7 @@ static Future<MSSQLConnection> connect(Vertx vertx, String connectionUri) {
6971
*/
7072
@Fluent
7173
@Override
74+
@Deprecated
7275
MSSQLConnection prepare(String s, Handler<AsyncResult<PreparedStatement>> handler);
7376

7477
/**

vertx-mssql-client/src/main/java/io/vertx/mssqlclient/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
1010
*/
1111

12-
@ModuleGen(name = "vertx-mssql-client", groupPackage = "io.vertx")
12+
@ModuleGen(name = "vertx-mssql-client", groupPackage = "io.vertx", checkCallbackDeprecation = true)
1313
package io.vertx.mssqlclient;
1414

1515
import io.vertx.codegen.annotations.ModuleGen;

vertx-mysql-client/src/main/java/io/vertx/mysqlclient/MySQLConnection.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public interface MySQLConnection extends SqlConnection {
4949
* @param connectOptions the options for the connection
5050
* @param handler the handler called with the connection or the failure
5151
*/
52+
@Deprecated
5253
static void connect(Vertx vertx, MySQLConnectOptions connectOptions, Handler<AsyncResult<MySQLConnection>> handler) {
5354
Future<MySQLConnection> fut = connect(vertx, connectOptions);
5455
if (handler != null) {
@@ -66,6 +67,7 @@ static Future<MySQLConnection> connect(Vertx vertx, MySQLConnectOptions connectO
6667
/**
6768
* Like {@link #connect(Vertx, MySQLConnectOptions, Handler)} with options built from {@code connectionUri}.
6869
*/
70+
@Deprecated
6971
static void connect(Vertx vertx, String connectionUri, Handler<AsyncResult<MySQLConnection>> handler) {
7072
connect(vertx, fromUri(connectionUri), handler);
7173
}
@@ -82,6 +84,7 @@ static Future<MySQLConnection> connect(Vertx vertx, String connectionUri) {
8284
*/
8385
@Fluent
8486
@Override
87+
@Deprecated
8588
MySQLConnection prepare(String sql, Handler<AsyncResult<PreparedStatement>> handler);
8689

8790
/**
@@ -105,6 +108,7 @@ static Future<MySQLConnection> connect(Vertx vertx, String connectionUri) {
105108
* @return a reference to this, so the API can be used fluently
106109
*/
107110
@Fluent
111+
@Deprecated
108112
MySQLConnection ping(Handler<AsyncResult<Void>> handler);
109113

110114
/**
@@ -120,6 +124,7 @@ static Future<MySQLConnection> connect(Vertx vertx, String connectionUri) {
120124
* @return a reference to this, so the API can be used fluently
121125
*/
122126
@Fluent
127+
@Deprecated
123128
MySQLConnection specifySchema(String schemaName, Handler<AsyncResult<Void>> handler);
124129

125130
/**
@@ -134,6 +139,7 @@ static Future<MySQLConnection> connect(Vertx vertx, String connectionUri) {
134139
* @return a reference to this, so the API can be used fluently
135140
*/
136141
@Fluent
142+
@Deprecated
137143
MySQLConnection getInternalStatistics(Handler<AsyncResult<String>> handler);
138144

139145
/**
@@ -150,6 +156,7 @@ static Future<MySQLConnection> connect(Vertx vertx, String connectionUri) {
150156
* @return a reference to this, so the API can be used fluently
151157
*/
152158
@Fluent
159+
@Deprecated
153160
MySQLConnection setOption(MySQLSetOption option, Handler<AsyncResult<Void>> handler);
154161

155162
/**
@@ -164,6 +171,7 @@ static Future<MySQLConnection> connect(Vertx vertx, String connectionUri) {
164171
* @return a reference to this, so the API can be used fluently
165172
*/
166173
@Fluent
174+
@Deprecated
167175
MySQLConnection resetConnection(Handler<AsyncResult<Void>> handler);
168176

169177
/**
@@ -178,6 +186,7 @@ static Future<MySQLConnection> connect(Vertx vertx, String connectionUri) {
178186
* @return a reference to this, so the API can be used fluently
179187
*/
180188
@Fluent
189+
@Deprecated
181190
MySQLConnection debug(Handler<AsyncResult<Void>> handler);
182191

183192
/**
@@ -193,6 +202,7 @@ static Future<MySQLConnection> connect(Vertx vertx, String connectionUri) {
193202
* @return a reference to this, so the API can be used fluently
194203
*/
195204
@Fluent
205+
@Deprecated
196206
MySQLConnection changeUser(MySQLAuthOptions options, Handler<AsyncResult<Void>> handler);
197207

198208
/**

vertx-mysql-client/src/main/java/io/vertx/mysqlclient/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*/
1717

18-
@ModuleGen(name = "vertx-mysql-client", groupPackage = "io.vertx")
18+
@ModuleGen(name = "vertx-mysql-client", groupPackage = "io.vertx", checkCallbackDeprecation = true)
1919
package io.vertx.mysqlclient;
2020

2121
import io.vertx.codegen.annotations.ModuleGen;

vertx-oracle-client/src/main/java/io/vertx/oracleclient/OracleConnection.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public interface OracleConnection extends SqlConnection {
3838
* @param connectOptions the options for the connection
3939
* @param handler the handler called with the connection or the failure
4040
*/
41+
@Deprecated
4142
static void connect(Vertx vertx, OracleConnectOptions connectOptions, Handler<AsyncResult<OracleConnection>> handler) {
4243
Objects.requireNonNull(handler);
4344
OracleConnectionImpl.connect(vertx, connectOptions).onComplete(handler);
@@ -53,6 +54,7 @@ static Future<OracleConnection> connect(Vertx vertx, OracleConnectOptions connec
5354
/**
5455
* Like {@link #connect(Vertx, OracleConnectOptions, Handler)} with options built from {@code connectionUri}.
5556
*/
57+
@Deprecated
5658
static void connect(Vertx vertx, String connectionUri, Handler<AsyncResult<OracleConnection>> handler) {
5759
connect(vertx, fromUri(connectionUri), handler);
5860
}
@@ -69,6 +71,7 @@ static Future<OracleConnection> connect(Vertx vertx, String connectionUri) {
6971
*/
7072
@Fluent
7173
@Override
74+
@Deprecated
7275
OracleConnection prepare(String s, Handler<AsyncResult<PreparedStatement>> handler);
7376

7477
/**

vertx-oracle-client/src/main/java/io/vertx/oracleclient/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
1010
*/
11-
@ModuleGen(name = "vertx-oracle-client", groupPackage = "io.vertx")
11+
@ModuleGen(name = "vertx-oracle-client", groupPackage = "io.vertx", checkCallbackDeprecation = true)
1212
package io.vertx.oracleclient;
1313

1414
import io.vertx.codegen.annotations.ModuleGen;

vertx-pg-client/src/main/java/io/vertx/pgclient/PgConnection.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public interface PgConnection extends SqlConnection {
5252
* @param options the connect options
5353
* @param handler the handler called with the connection or the failure
5454
*/
55+
@Deprecated
5556
static void connect(Vertx vertx, PgConnectOptions options, Handler<AsyncResult<PgConnection>> handler) {
5657
Future<PgConnection> fut = connect(vertx, options);
5758
if (handler != null) {
@@ -69,6 +70,7 @@ static Future<PgConnection> connect(Vertx vertx, PgConnectOptions options) {
6970
/**
7071
* Like {@link #connect(Vertx, PgConnectOptions, Handler)} with options build from the environment variables.
7172
*/
73+
@Deprecated
7274
static void connect(Vertx vertx, Handler<AsyncResult<PgConnection>> handler) {
7375
connect(vertx, PgConnectOptions.fromEnv(), handler);
7476
}
@@ -83,6 +85,7 @@ static Future<PgConnection> connect(Vertx vertx) {
8385
/**
8486
* Like {@link #connect(Vertx, PgConnectOptions, Handler)} with options build from {@code connectionUri}.
8587
*/
88+
@Deprecated
8689
static void connect(Vertx vertx, String connectionUri, Handler<AsyncResult<PgConnection>> handler) {
8790
connect(vertx, PgConnectOptions.fromUri(connectionUri), handler);
8891
}
@@ -122,6 +125,7 @@ static Future<PgConnection> connect(Vertx vertx, String connectionUri) {
122125
* @param handler the handler notified if cancelling request is sent
123126
* @return a reference to this, so the API can be used fluently
124127
*/
128+
@Deprecated
125129
PgConnection cancelRequest(Handler<AsyncResult<Void>> handler);
126130

127131
/**
@@ -138,6 +142,7 @@ static Future<PgConnection> connect(Vertx vertx, String connectionUri) {
138142
* {@inheritDoc}
139143
*/
140144
@Fluent
145+
@Deprecated
141146
@Override
142147
PgConnection prepare(String sql, Handler<AsyncResult<PreparedStatement>> handler);
143148

vertx-pg-client/src/main/java/io/vertx/pgclient/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*/
1717

18-
@ModuleGen(name = "vertx-pg-client", groupPackage = "io.vertx")
18+
@ModuleGen(name = "vertx-pg-client", groupPackage = "io.vertx", checkCallbackDeprecation = true)
1919
package io.vertx.pgclient;
2020

2121
import io.vertx.codegen.annotations.ModuleGen;

0 commit comments

Comments
 (0)