diff --git a/src/main/java/org/tarantool/TarantoolClientImpl.java b/src/main/java/org/tarantool/TarantoolClientImpl.java index 85e8680b..22922733 100644 --- a/src/main/java/org/tarantool/TarantoolClientImpl.java +++ b/src/main/java/org/tarantool/TarantoolClientImpl.java @@ -270,6 +270,7 @@ protected Future exec(Code code, Object... args) { * {@code timeoutMillis} will override the default * timeout. 0 means the limitless operation. * + * @param timeoutMillis operation timeout * @param code operation code * @param args operation arguments * @@ -736,6 +737,11 @@ public String toString() { /** * Missed in jdk8 CompletableFuture operator to limit execution * by time. + * + * @param timeout execution timeout + * @param unit measurement unit for given timeout value + * + * @return a future on which the method is called */ public TarantoolOp orTimeout(long timeout, TimeUnit unit) { if (timeout < 0) { @@ -838,6 +844,8 @@ protected int getState() { /** * Set CLOSED state, drop RECONNECT state. + * + * @return whether a state was changed to CLOSED */ protected boolean close() { for (; ; ) { @@ -856,9 +864,13 @@ protected boolean close() { } /** - * Move from a current state to a give one. + * Move from a current state to a given one. *

* Some moves are forbidden. + * + * @param mask union of states + * + * @return whether a state was changed to given one */ protected boolean acquire(int mask) { for (; ; ) { @@ -913,6 +925,10 @@ protected boolean compareAndSet(int expect, int update) { /** * Reconnection uses another way to await state via receiving a signal * instead of latches. + * + * @param state desired state + * + * @throws InterruptedException if the current thread is interrupted */ protected void awaitState(int state) throws InterruptedException { if (state == RECONNECT) { diff --git a/src/main/java/org/tarantool/jdbc/SQLStatement.java b/src/main/java/org/tarantool/jdbc/SQLStatement.java index a57b2ab2..e8959234 100644 --- a/src/main/java/org/tarantool/jdbc/SQLStatement.java +++ b/src/main/java/org/tarantool/jdbc/SQLStatement.java @@ -404,6 +404,9 @@ public boolean isWrapperFor(Class type) throws SQLException { /** * Clears the results of the most recent execution. + * + * @throws SQLException if this method is called on a closed + * {@code Statement} */ protected void discardLastResults() throws SQLException { final SQLResultSet lastResultSet = resultSet; @@ -425,10 +428,18 @@ protected void discardLastResults() throws SQLException { /** * Performs query execution. * - * @param sql query - * @param params optional params + * @param autoGeneratedKeys whether auto-generated keys should be collected; + * one of the following constants: + * {@code Statement.RETURN_GENERATED_KEYS}, + * {@code Statement.NO_GENERATED_KEYS} + * @see #getGeneratedKeys() + * @param sql query + * @param params optional params * * @return {@code true}, if the result is a ResultSet object; + * + * @throws SQLException if this method is called on a closed + * {@code Statement} */ protected boolean executeInternal(int autoGeneratedKeys, String sql, Object... params) throws SQLException { discardLastResults(); @@ -456,6 +467,9 @@ protected boolean executeInternal(int autoGeneratedKeys, String sql, Object... p * @param queries batch queries * * @return update count result per query + * + * @throws SQLException if this method is called on a closed + * {@code Statement} */ protected int[] executeBatchInternal(List queries) throws SQLException { SQLBatchResultHolder batchResult = connection.executeBatch(timeout, queries); diff --git a/src/main/java/org/tarantool/jdbc/TarantoolStatement.java b/src/main/java/org/tarantool/jdbc/TarantoolStatement.java index 879a03d6..61c6749e 100644 --- a/src/main/java/org/tarantool/jdbc/TarantoolStatement.java +++ b/src/main/java/org/tarantool/jdbc/TarantoolStatement.java @@ -12,6 +12,9 @@ public interface TarantoolStatement extends Statement { /** * Checks for statement completion and closes itself, * according to {@link Statement#closeOnCompletion()}. + * + * @throws SQLException if this method is called on a closed + * {@code Statement} */ void checkCompletion() throws SQLException; diff --git a/src/main/java/org/tarantool/logging/LoggerFactory.java b/src/main/java/org/tarantool/logging/LoggerFactory.java index 9a2227bc..be9b8376 100644 --- a/src/main/java/org/tarantool/logging/LoggerFactory.java +++ b/src/main/java/org/tarantool/logging/LoggerFactory.java @@ -17,6 +17,7 @@ * } *

* There are four major attempts to load the logger provider: + *

    *
  1. * Use a runtime system property {@literal org.tarantool.logging.provider}. * Possible values are 'slf4j' or 'jdk'. (for instance, @@ -32,6 +33,7 @@ *
  2. * Use JUL implementation if none of above attempts are successful. *
  3. + *
*

* This class is not a part of public API. */ diff --git a/src/main/java/org/tarantool/protocol/ProtoUtils.java b/src/main/java/org/tarantool/protocol/ProtoUtils.java index ec3283b7..7b1a12be 100644 --- a/src/main/java/org/tarantool/protocol/ProtoUtils.java +++ b/src/main/java/org/tarantool/protocol/ProtoUtils.java @@ -38,6 +38,7 @@ public abstract class ProtoUtils { * Reads tarantool binary protocol's packet from {@code inputStream}. * * @param inputStream ready to use input stream + * @param msgPackLite MessagePack decoder instance * * @return Nonnull instance of packet * @@ -64,6 +65,7 @@ public static TarantoolPacket readPacket(InputStream inputStream, MsgPackLite ms * * @param bufferReader readable channel that have to be in blocking mode * or instance of {@link ReadableViaSelectorChannel} + * @param msgPackLite MessagePack decoder instance * * @return tarantool binary protocol message wrapped by instance of {@link TarantoolPacket} * @@ -121,6 +123,7 @@ public static TarantoolPacket readPacket(ReadableByteChannel bufferReader, MsgPa * @param socket a socket channel to a tarantool node * @param username auth username * @param password auth password + * @param msgPackLite MessagePack encoder / decoder instance * * @return object with information about a connection/ * @@ -163,6 +166,7 @@ public static TarantoolGreeting connect(Socket socket, * @param channel a socket channel to tarantool node. The channel have to be in blocking mode * @param username auth username * @param password auth password + * @param msgPackLite MessagePack encoder / decoder instance * * @return object with information about a connection/ *