deprecated methods removed

pull/3048/head
Nikita Koksharov 4 years ago
parent 64ee853db3
commit aa6d7e3972

@ -487,16 +487,6 @@ public class RedissonSemaphore extends RedissonExpirable implements RSemaphore {
Arrays.<Object>asList(getName(), getChannelName()), permits);
}
@Override
public void reducePermits(int permits) {
get(reducePermitsAsync(permits));
}
@Override
public RFuture<Void> reducePermitsAsync(int permits) {
return addPermitsAsync(-permits);
}
@Override
public void addPermits(int permits) {
get(addPermitsAsync(permits));

@ -124,12 +124,6 @@ public interface RSemaphore extends RExpirable, RSemaphoreAsync {
*/
boolean trySetPermits(int permits);
/*
* Use addPermits instead
*/
@Deprecated
void reducePermits(int permits);
/**
* Increases or decreases the number of available permits by defined value.
*

@ -110,12 +110,6 @@ public interface RSemaphoreAsync extends RExpirableAsync {
*/
RFuture<Boolean> tryAcquireAsync(int permits, long waitTime, TimeUnit unit);
/*
* Use addPermits instead
*/
@Deprecated
RFuture<Void> reducePermitsAsync(int permits);
/**
* Increases or decreases the number of available permits by defined value.
*

@ -56,7 +56,7 @@ public class RedissonSemaphoreTest extends BaseConcurrentTest {
s.trySetPermits(10);
s.acquire(10);
s.reducePermits(5);
s.addPermits(-5);
assertThat(s.availablePermits()).isEqualTo(-5);
s.release(10);
assertThat(s.availablePermits()).isEqualTo(5);

Loading…
Cancel
Save