Skip to content

Commit

Permalink
[misc] javadoc addition
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Sep 7, 2022
1 parent 57a5f06 commit 506ab96
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
Expand Up @@ -23,7 +23,7 @@
* possibility:
*
* <ul>
* <li>With >= MariaDB server, you can use the query "SET STATEMENT net_write_timeout=10000 FOR
* <li>With &gt; MariaDB server, you can use the query "SET STATEMENT net_write_timeout=10000 FOR
* XXX" with XXX your "normal" query. This will indicate that specifically for this query,
* net_write_timeout will be set to a longer time (10000 in this example).
* <li>for non mariadb servers, a specific query will have to temporarily set net_write_timeout
Expand Down
Expand Up @@ -12,7 +12,8 @@

/**
* Compression writer handler Permit to wrap standard packet to compressed packet ( 7 byte header).
* Driver will compress packet only if packet size is meaningful (1536 bytes) > to one TCP packet.
* Driver will compress packet only if packet size is meaningful (1536 bytes) &gt; to one TCP
* packet.
*/
public class CompressOutputStream extends OutputStream {
private static final int MIN_COMPRESSION_SIZE = 1536; // TCP-IP single packet
Expand Down
12 changes: 7 additions & 5 deletions src/main/java/org/mariadb/jdbc/codec/NonNullParameter.java
Expand Up @@ -10,16 +10,18 @@
import org.mariadb.jdbc.client.socket.Writer;
import org.mariadb.jdbc.plugin.Codec;

public class NonNullParameter<T> extends Parameter {
/**
* Parameter wrapper for primitive, knowing that value cannot be null, permitting fast path for few
* methods.
*
* @param <T> value type
*/
public class NonNullParameter<T> extends Parameter<T> {

public NonNullParameter(Codec<T> codec, T value) {
super(codec, value);
}

public NonNullParameter(Codec<T> codec, T value, Long length) {
super(codec, value, length);
}

@Override
public void encodeText(Writer encoder, Context context) throws IOException, SQLException {
codec.encodeText(encoder, context, this.value, null, length);
Expand Down
Expand Up @@ -7,8 +7,8 @@
import java.io.IOException;

/**
* Dedicate exception when error is due to sending packet with size > to server max_allowed_packet,
* that would cause server to drop connection
* Dedicate exception when error is due to sending packet with size &gt; to server
* max_allowed_packet, that would cause server to drop connection
*/
public class MaxAllowedPacketException extends IOException {

Expand Down

0 comments on commit 506ab96

Please sign in to comment.