Skip to content

build: fix errors and warnings re api docs #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/main/java/org/tarantool/TarantoolClientImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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<V> orTimeout(long timeout, TimeUnit unit) {
if (timeout < 0) {
Expand Down Expand Up @@ -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 (; ; ) {
Expand All @@ -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.
* <p>
* Some moves are forbidden.
*
* @param mask union of states
*
* @return whether a state was changed to given one
*/
protected boolean acquire(int mask) {
for (; ; ) {
Expand Down Expand Up @@ -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) {
Expand Down
18 changes: 16 additions & 2 deletions src/main/java/org/tarantool/jdbc/SQLStatement.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down Expand Up @@ -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<SQLQueryHolder> queries) throws SQLException {
SQLBatchResultHolder batchResult = connection.executeBatch(timeout, queries);
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/org/tarantool/jdbc/TarantoolStatement.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/tarantool/logging/LoggerFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* } </pre>
* <p>
* There are four major attempts to load the logger provider:
* <ol>
* <li>
* Use a runtime system property {@literal org.tarantool.logging.provider}.
* Possible values are 'slf4j' or 'jdk'. (for instance,
Expand All @@ -32,6 +33,7 @@
* <li>
* Use JUL implementation if none of above attempts are successful.
* </li>
* </ol>
* <p>
* This class is not a part of public API.
*/
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/tarantool/protocol/ProtoUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand All @@ -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}
*
Expand Down Expand Up @@ -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/
*
Expand Down Expand Up @@ -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/
*
Expand Down