|
|
|
@ -15,17 +15,13 @@
|
|
|
|
|
*/
|
|
|
|
|
package org.redisson.reactive;
|
|
|
|
|
|
|
|
|
|
import java.util.UUID;
|
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
|
|
import org.reactivestreams.Publisher;
|
|
|
|
|
import org.redisson.RedissonLock;
|
|
|
|
|
import org.redisson.RedissonSemaphore;
|
|
|
|
|
import org.redisson.api.RFuture;
|
|
|
|
|
import org.redisson.api.RLockAsync;
|
|
|
|
|
import org.redisson.api.RSemaphoreAsync;
|
|
|
|
|
import org.redisson.api.RSemaphoreReactive;
|
|
|
|
|
import org.redisson.command.CommandAsyncExecutor;
|
|
|
|
|
import org.redisson.command.CommandReactiveExecutor;
|
|
|
|
|
import org.redisson.pubsub.SemaphorePubSub;
|
|
|
|
|
|
|
|
|
@ -45,10 +41,6 @@ public class RedissonSemaphoreReactive extends RedissonExpirableReactive impleme
|
|
|
|
|
instance = new RedissonSemaphore(commandExecutor, name, semaphorePubSub);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected RLockAsync createLock(CommandAsyncExecutor connectionManager, String name) {
|
|
|
|
|
return new RedissonLock(commandExecutor, name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Publisher<Boolean> tryAcquire() {
|
|
|
|
|
return reactive(new Supplier<RFuture<Boolean>>() {
|
|
|
|
|