Skip to content

Commit 739e6b9

Browse files
committed
MySQL command messages should be named MySQLCommandMessage instead of MySQLCommandCodec for more clarity.
1 parent 882256a commit 739e6b9

23 files changed

+74
-74
lines changed

vertx-mysql-client/src/main/java/io/vertx/mysqlclient/impl/MySQLSocketConnection.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
import io.vertx.mysqlclient.MySQLConnectOptions;
2929
import io.vertx.mysqlclient.SslMode;
3030
import io.vertx.mysqlclient.impl.codec.ClearCachedStatementsEvent;
31-
import io.vertx.mysqlclient.impl.codec.CommandCodec;
32-
import io.vertx.mysqlclient.impl.codec.ExtendedBatchQueryCommandCodec;
33-
import io.vertx.mysqlclient.impl.codec.ExtendedQueryCommandCodec;
31+
import io.vertx.mysqlclient.impl.codec.MySQLCommand;
32+
import io.vertx.mysqlclient.impl.codec.ExtendedBatchQueryMySQLCommand;
33+
import io.vertx.mysqlclient.impl.codec.ExtendedQueryMySQLCommand;
3434
import io.vertx.mysqlclient.impl.codec.MySQLCodec;
3535
import io.vertx.mysqlclient.impl.codec.MySQLPacketDecoder;
3636
import io.vertx.mysqlclient.impl.codec.MySQLPreparedStatement;
@@ -105,15 +105,15 @@ public void init() {
105105
@Override
106106
protected CommandMessage<?, ?> toMessage(ExtendedQueryCommand<?> command, PreparedStatement preparedStatement) {
107107
if (command.isBatch()) {
108-
return new ExtendedBatchQueryCommandCodec<>(command, (MySQLPreparedStatement) preparedStatement);
108+
return new ExtendedBatchQueryMySQLCommand<>(command, (MySQLPreparedStatement) preparedStatement);
109109
} else {
110-
return new ExtendedQueryCommandCodec<>(command, (MySQLPreparedStatement) preparedStatement);
110+
return new ExtendedQueryMySQLCommand<>(command, (MySQLPreparedStatement) preparedStatement);
111111
}
112112
}
113113

114114
@Override
115115
protected CommandMessage<?, ?> toMessage(CommandBase<?> command) {
116-
return CommandCodec.wrap(command);
116+
return MySQLCommand.wrap(command);
117117
}
118118

119119
@Override
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import java.util.Arrays;
2323
import java.util.Map;
2424

25-
abstract class AuthenticationCommandBaseCodec<R, C extends AuthenticationCommandBase<R>> extends CommandCodec<R, C> {
25+
abstract class AuthenticationMySQLCommandBase<R, C extends AuthenticationCommandBase<R>> extends MySQLCommand<R, C> {
2626
protected static final int NONCE_LENGTH = 20;
2727
protected static final int AUTH_SWITCH_REQUEST_STATUS_FLAG = 0xFE;
2828

@@ -35,7 +35,7 @@ abstract class AuthenticationCommandBaseCodec<R, C extends AuthenticationCommand
3535

3636
private boolean isWaitingForRsaPublicKey = false;
3737

38-
AuthenticationCommandBaseCodec(C cmd) {
38+
AuthenticationMySQLCommandBase(C cmd) {
3939
super(cmd);
4040
}
4141

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
import static io.vertx.mysqlclient.impl.protocol.CapabilitiesFlag.*;
2727
import static io.vertx.mysqlclient.impl.protocol.Packets.*;
2828

29-
class ChangeUserCommandCodec extends AuthenticationCommandBaseCodec<Void, ChangeUserCommand> {
30-
ChangeUserCommandCodec(ChangeUserCommand cmd) {
29+
class ChangeUserMySQLCommand extends AuthenticationMySQLCommandBase<Void, ChangeUserCommand> {
30+
ChangeUserMySQLCommand(ChangeUserCommand cmd) {
3131
super(cmd);
3232
}
3333

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
import io.vertx.mysqlclient.impl.protocol.CommandType;
1616
import io.vertx.sqlclient.spi.protocol.CloseConnectionCommand;
1717

18-
class CloseConnectionCommandCodec extends CommandCodec<Void, CloseConnectionCommand> {
18+
class CloseConnectionMySQLCommand extends MySQLCommand<Void, CloseConnectionCommand> {
1919
private static final int PAYLOAD_LENGTH = 1;
2020

21-
CloseConnectionCommandCodec(CloseConnectionCommand cmd) {
21+
CloseConnectionMySQLCommand(CloseConnectionCommand cmd) {
2222
super(cmd);
2323
}
2424

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
import io.vertx.sqlclient.spi.protocol.CloseStatementCommand;
1717
import io.vertx.sqlclient.codec.CommandResponse;
1818

19-
class CloseStatementCommandCodec extends CommandCodec<Void, CloseStatementCommand> {
19+
class CloseStatementMySQLCommand extends MySQLCommand<Void, CloseStatementCommand> {
2020
private static final int PAYLOAD_LENGTH = 5;
2121

22-
CloseStatementCommandCodec(CloseStatementCommand cmd) {
22+
CloseStatementMySQLCommand(CloseStatementCommand cmd) {
2323
super(cmd);
2424
}
2525

vertx-mysql-client/src/main/java/io/vertx/mysqlclient/impl/codec/DebugCommandCodec.java renamed to vertx-mysql-client/src/main/java/io/vertx/mysqlclient/impl/codec/DebugMySQLCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
import io.vertx.mysqlclient.impl.command.DebugCommand;
1616
import io.vertx.mysqlclient.impl.protocol.CommandType;
1717

18-
class DebugCommandCodec extends CommandCodec<Void, DebugCommand> {
18+
class DebugMySQLCommand extends MySQLCommand<Void, DebugCommand> {
1919
private static final int PAYLOAD_LENGTH = 1;
2020

21-
DebugCommandCodec(DebugCommand cmd) {
21+
DebugMySQLCommand(DebugCommand cmd) {
2222
super(cmd);
2323
}
2424

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525

2626
import static io.vertx.mysqlclient.impl.protocol.Packets.EnumCursorType.*;
2727

28-
public class ExtendedBatchQueryCommandCodec<R> extends ExtendedQueryCommandBaseCodec<R, ExtendedQueryCommand<R>> {
28+
public class ExtendedBatchQueryMySQLCommand<R> extends ExtendedQueryMySQLCommandBase<R, ExtendedQueryCommand<R>> {
2929

3030
private final List<TupleBase> params;
3131
private final BitSet bindingFailures;
3232
private boolean pipeliningEnabled;
3333
private int sent;
3434
private int received;
3535

36-
public ExtendedBatchQueryCommandCodec(ExtendedQueryCommand<R> cmd, MySQLPreparedStatement statement) {
36+
public ExtendedBatchQueryMySQLCommand(ExtendedQueryCommand<R> cmd, MySQLPreparedStatement statement) {
3737
super(cmd, statement);
3838
params = cmd.paramsList();
3939
bindingFailures = new BitSet(params.size());
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
import static io.vertx.mysqlclient.impl.protocol.Packets.EnumCursorType.CURSOR_TYPE_NO_CURSOR;
2727
import static io.vertx.mysqlclient.impl.protocol.Packets.EnumCursorType.CURSOR_TYPE_READ_ONLY;
2828

29-
public class ExtendedQueryCommandCodec<R> extends ExtendedQueryCommandBaseCodec<R, ExtendedQueryCommand<R>> {
30-
public ExtendedQueryCommandCodec(ExtendedQueryCommand<R> cmd, MySQLPreparedStatement statement) {
29+
public class ExtendedQueryMySQLCommand<R> extends ExtendedQueryMySQLCommandBase<R, ExtendedQueryCommand<R>> {
30+
public ExtendedQueryMySQLCommand(ExtendedQueryCommand<R> cmd, MySQLPreparedStatement statement) {
3131
super(cmd, statement);
3232
if (cmd.fetch() > 0 && statement.isCursorOpen) {
3333
// restore the state we need for decoding fetch response based on the prepared statement
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121

2222
import static io.vertx.mysqlclient.impl.protocol.Packets.*;
2323

24-
abstract class ExtendedQueryCommandBaseCodec<R, C extends ExtendedQueryCommand<R>> extends QueryCommandBaseCodec<R, C> {
24+
abstract class ExtendedQueryMySQLCommandBase<R, C extends ExtendedQueryCommand<R>> extends QueryMySQLCommandBase<R, C> {
2525

2626
protected final MySQLPreparedStatement statement;
2727

28-
ExtendedQueryCommandBaseCodec(C cmd, MySQLPreparedStatement statement) {
28+
ExtendedQueryMySQLCommandBase(C cmd, MySQLPreparedStatement statement) {
2929
super(cmd, DataFormat.BINARY);
3030
this.statement = statement;
3131
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
import java.nio.charset.StandardCharsets;
1919

20-
class InitDbCommandCodec extends CommandCodec<Void, InitDbCommand> {
21-
InitDbCommandCodec(InitDbCommand cmd) {
20+
class InitDbMySQLCommand extends MySQLCommand<Void, InitDbCommand> {
21+
InitDbMySQLCommand(InitDbCommand cmd) {
2222
super(cmd);
2323
}
2424

0 commit comments

Comments
 (0)