@@ -270,6 +270,7 @@ protected Future<?> exec(Code code, Object... args) {
270
270
* {@code timeoutMillis} will override the default
271
271
* timeout. 0 means the limitless operation.
272
272
*
273
+ * @param timeoutMillis operation timeout
273
274
* @param code operation code
274
275
* @param args operation arguments
275
276
*
@@ -736,6 +737,11 @@ public String toString() {
736
737
/**
737
738
* Missed in jdk8 CompletableFuture operator to limit execution
738
739
* by time.
740
+ *
741
+ * @param timeout execution timeout
742
+ * @param unit measurement unit for given timeout value
743
+ *
744
+ * @return a future on which the method is called
739
745
*/
740
746
public TarantoolOp <V > orTimeout (long timeout , TimeUnit unit ) {
741
747
if (timeout < 0 ) {
@@ -838,6 +844,8 @@ protected int getState() {
838
844
839
845
/**
840
846
* Set CLOSED state, drop RECONNECT state.
847
+ *
848
+ * @return whether a state was changed to CLOSED
841
849
*/
842
850
protected boolean close () {
843
851
for (; ; ) {
@@ -856,9 +864,13 @@ protected boolean close() {
856
864
}
857
865
858
866
/**
859
- * Move from a current state to a give one.
867
+ * Move from a current state to a given one.
860
868
* <p>
861
869
* Some moves are forbidden.
870
+ *
871
+ * @param mask union of states
872
+ *
873
+ * @return whether a state was changed to given one
862
874
*/
863
875
protected boolean acquire (int mask ) {
864
876
for (; ; ) {
@@ -913,6 +925,10 @@ protected boolean compareAndSet(int expect, int update) {
913
925
/**
914
926
* Reconnection uses another way to await state via receiving a signal
915
927
* instead of latches.
928
+ *
929
+ * @param state desired state
930
+ *
931
+ * @throws InterruptedException if the current thread is interrupted
916
932
*/
917
933
protected void awaitState (int state ) throws InterruptedException {
918
934
if (state == RECONNECT ) {
0 commit comments