Skip to content

Commit

Permalink
fix: Removed method/enum with Deprecated(forRemoval=true)
Browse files Browse the repository at this point in the history
  • Loading branch information
hishidama committed Aug 26, 2024
1 parent 7df2f25 commit 37214e2
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 135 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,28 +98,6 @@ public enum TgTimeoutKey {
TABLE_METADATA_CLOSE,

;

/**
* {@link TsurugiStatementResult} connect.
*
* @see #RESULT_CONNECT
*/
@Deprecated(forRemoval = true, since = "1.3.0")
public static final TgTimeoutKey RESULT_CHECK = RESULT_CONNECT;
/**
* {@link TsurugiTableMetadataHelper} connect.
*
* @see #TABLE_METADATA_CONNECT
*/
@Deprecated(forRemoval = true, since = "1.3.0")
public static final TgTimeoutKey METADATA_CONNECT = TABLE_METADATA_CONNECT;
/**
* {@link TsurugiTableMetadataHelper} close.
*
* @see #TABLE_METADATA_CLOSE
*/
@Deprecated(forRemoval = true, since = "1.3.0")
public static final TgTimeoutKey METADATA_CLOSE = TABLE_METADATA_CLOSE;
}

private String sessionLabel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.function.Predicate;

Expand All @@ -30,7 +29,6 @@
import com.tsurugidb.iceaxe.util.IceaxeInternal;
import com.tsurugidb.iceaxe.util.IceaxeIoUtil;
import com.tsurugidb.iceaxe.util.InterruptedRuntimeException;
import com.tsurugidb.iceaxe.util.TgTimeValue;
import com.tsurugidb.iceaxe.util.function.TsurugiTransactionConsumer;
import com.tsurugidb.sql.proto.SqlCommon.Column;
import com.tsurugidb.tsubakuro.exception.ServerException;
Expand Down Expand Up @@ -114,52 +112,6 @@ public void initialize(FutureResponse<ResultSet> lowResultSetFuture) throws IOEx
}
}

/**
* set ResetSet-timeout.
*
* @param time time value
* @param unit time unit
* @see #setConnectTimeout(long, TimeUnit)
*/
@Deprecated(since = "1.5.0", forRemoval = true)
public void setRsConnectTimeout(long time, TimeUnit unit) {
setConnectTimeout(time, unit);
}

/**
* set ResetSet-timeout.
*
* @param timeout time
* @see #setConnectTimeout(TgTimeValue)
*/
@Deprecated(since = "1.5.0", forRemoval = true)
public void setRsConnectTimeout(TgTimeValue timeout) {
setConnectTimeout(timeout);
}

/**
* set ResetSet-close-timeout.
*
* @param time timeout time
* @param unit timeout unit
* @see #setCloseTimeout(long, TimeUnit)
*/
@Deprecated(since = "1.5.0", forRemoval = true)
public void setRsCloseTimeout(long time, TimeUnit unit) {
setCloseTimeout(time, unit);
}

/**
* set ResetSet-close-timeout.
*
* @param timeout time
* @see #setCloseTimeout(TgTimeValue)
*/
@Deprecated(since = "1.5.0", forRemoval = true)
public void setRsCloseTimeout(TgTimeValue timeout) {
setCloseTimeout(timeout);
}

/**
* add event listener.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.function.Predicate;

Expand All @@ -24,7 +23,6 @@
import com.tsurugidb.iceaxe.transaction.exception.TsurugiTransactionException;
import com.tsurugidb.iceaxe.util.IceaxeInternal;
import com.tsurugidb.iceaxe.util.IceaxeIoUtil;
import com.tsurugidb.iceaxe.util.TgTimeValue;
import com.tsurugidb.tsubakuro.sql.ExecuteResult;
import com.tsurugidb.tsubakuro.util.FutureResponse;

Expand Down Expand Up @@ -94,29 +92,6 @@ public void initialize(FutureResponse<ExecuteResult> lowResultFuture) throws IOE
}
}

/**
* set check-timeout.
*
* @param time timeout time
* @param unit timeout unit
* @see #setConnectTimeout(long, TimeUnit)
*/
@Deprecated(since = "1.5.0", forRemoval = true)
public void setCheckTimeout(long time, TimeUnit unit) {
setConnectTimeout(time, unit);
}

/**
* set check-timeout.
*
* @param timeout time
* @see #setConnectTimeout(TgTimeValue)
*/
@Deprecated(since = "1.5.0", forRemoval = true)
public void setCheckTimeout(TgTimeValue timeout) {
setConnectTimeout(timeout);
}

/**
* add event listener.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,6 @@ void lowCloseTimeout_set() throws Exception {
testLowCloseTimeout(sessionOption, ps -> ps.setCloseTimeout(1, TimeUnit.SECONDS));
}

@Test
@SuppressWarnings("removal") // TODO remove this test
void lowCloseTimeout_set_old() throws Exception {
var sessionOption = TgSessionOption.of();

testLowCloseTimeout(sessionOption, ps -> ps.setRsCloseTimeout(1, TimeUnit.SECONDS));
}

private void testLowCloseTimeout(TgSessionOption sessionOption, Consumer<TsurugiQueryResult<?>> modifier) throws Exception {
var future = new TestFutureResponse<ResultSet>() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@ void connectTimeout_set() throws Exception {
testConnectTimeout(sessionOption, rs -> rs.setConnectTimeout(1, TimeUnit.SECONDS));
}

@Test
@SuppressWarnings("removal") // TODO remove this test
void connectTimeout_set_old() throws Exception {
var sessionOption = TgSessionOption.of();

testConnectTimeout(sessionOption, rs -> rs.setRsConnectTimeout(1, TimeUnit.SECONDS));
}

private void testConnectTimeout(TgSessionOption sessionOption, Consumer<TsurugiQueryResult<?>> modifier) throws Exception {
var future = new TestFutureResponse<ResultSet>();
future.setExpectedTimeout(1, TimeUnit.SECONDS);
Expand Down Expand Up @@ -101,14 +93,6 @@ void futureCloseTimeout_set() throws Exception {
testFutureCloseTimeout(sessionOption, rs -> rs.setConnectTimeout(1, TimeUnit.SECONDS));
}

@Test
@SuppressWarnings("removal") // TODO remove this test
void futureCloseTimeout_set_old() throws Exception {
var sessionOption = TgSessionOption.of();

testFutureCloseTimeout(sessionOption, rs -> rs.setRsConnectTimeout(1, TimeUnit.SECONDS));
}

private void testFutureCloseTimeout(TgSessionOption sessionOption, Consumer<TsurugiQueryResult<?>> modifier) throws Exception {
var future = new TestFutureResponse<ResultSet>();
future.setExpectedCloseTimeout(1, TimeUnit.SECONDS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@ void connectTimeout_set() throws Exception {
testConnectTimeout(sessionOption, rs -> rs.setConnectTimeout(1, TimeUnit.SECONDS));
}

@Test
@SuppressWarnings("removal") // TODO remove this test
void connectTimeout_set_old() throws Exception {
var sessionOption = TgSessionOption.of();

testConnectTimeout(sessionOption, rs -> rs.setCheckTimeout(1, TimeUnit.SECONDS));
}

private void testConnectTimeout(TgSessionOption sessionOption, Consumer<TsurugiStatementResult> modifier) throws Exception {
var future = new TestFutureResponse<ExecuteResult>();
future.setExpectedTimeout(1, TimeUnit.SECONDS);
Expand Down Expand Up @@ -101,14 +93,6 @@ void futureCloseTimeout_set() throws Exception {
testFutureCloseTimeout(sessionOption, rs -> rs.setConnectTimeout(1, TimeUnit.SECONDS));
}

@Test
@SuppressWarnings("removal") // TODO remove this test
void futureCloseTimeout_set_old() throws Exception {
var sessionOption = TgSessionOption.of();

testFutureCloseTimeout(sessionOption, rs -> rs.setCheckTimeout(1, TimeUnit.SECONDS));
}

private void testFutureCloseTimeout(TgSessionOption sessionOption, Consumer<TsurugiStatementResult> modifier) throws Exception {
var future = new TestFutureResponse<ExecuteResult>();
future.setExpectedCloseTimeout(1, TimeUnit.SECONDS);
Expand Down

0 comments on commit 37214e2

Please sign in to comment.