@Override public RPermitExpirableSemaphore getPermitExpirableSemaphore(V value) { String lockName = getLockName(value, "permitexpirablesemaphore"); return new RedissonPermitExpirableSemaphore(commandExecutor, lockName, ((Redisson)redisson).getSemaphorePubSub()); }
@Override public RPermitExpirableSemaphore getPermitExpirableSemaphore(K key) { String lockName = getLockName(key, "permitexpirablesemaphore"); return new RedissonPermitExpirableSemaphore(commandExecutor, lockName, ((Redisson)redisson).getSemaphorePubSub()); }
@Override public RSemaphore getSemaphore(V value) { String lockName = getLockName(value, "semaphore"); return new RedissonSemaphore(commandExecutor, lockName, ((Redisson)redisson).getSemaphorePubSub()); }
public RedissonSortedSet(Codec codec, CommandExecutor commandExecutor, String name, Redisson redisson) { super(codec, commandExecutor, name); this.commandExecutor = commandExecutor; comparatorHolder = redisson.getBucket(getComparatorKeyName(), StringCodec.INSTANCE); lock = redisson.getLock("redisson_sortedset_lock:{" + getName() + "}"); list = (RedissonList<V>) redisson.getList(getName(), codec); loadComparator(); }
@Override public void commit(CommandAsyncExecutor commandExecutor) { RedissonBucket<V> bucket = new RedissonBucket<V>(codec, commandExecutor, name); bucket.getAndSetAsync((V) value); RedissonLock lock = new RedissonLock(commandExecutor, lockName); lock.unlockAsync(); }
@Override public void commit(CommandAsyncExecutor commandExecutor) { RedissonBucket<V> bucket = new RedissonBucket<V>(codec, commandExecutor, name); bucket.compareAndSetAsync(expected, value); RedissonLock lock = new RedissonLock(commandExecutor, lockName); lock.unlockAsync(); }
@Override public void commit(CommandAsyncExecutor commandExecutor) { RedissonBucket<V> bucket = new RedissonBucket<V>(codec, commandExecutor, name); if (timeToLive != 0) { bucket.setAsync((V) value, timeToLive, timeUnit); } else { bucket.setAsync((V) value); } RedissonLock lock = new RedissonLock(commandExecutor, lockName); lock.unlockAsync(); }
@Override public RSemaphore getSemaphore(V value) { String lockName = getLockName(value, "semaphore"); return new RedissonSemaphore(commandExecutor, lockName, ((Redisson)redisson).getSemaphorePubSub()); }
@Override public RSemaphore getSemaphore(K key) { String lockName = getLockName(key, "semaphore"); return new RedissonSemaphore(commandExecutor, lockName, ((Redisson)redisson).getSemaphorePubSub()); }
@Override public RPermitExpirableSemaphore getPermitExpirableSemaphore(V value) { String lockName = getLockName(value, "permitexpirablesemaphore"); return new RedissonPermitExpirableSemaphore(commandExecutor, lockName, ((Redisson)redisson).getSemaphorePubSub()); }
@Override protected Iterator<V> getIterator(String name) { RedissonSet<V> set = new RedissonSet<V>(codec, commandExecutor, map.getValuesName(name), null); return set.iterator(); }
@Override public RCountDownLatch getCountDownLatch(V value) { String lockName = getLockName(value, "countdownlatch"); return new RedissonCountDownLatch(commandExecutor, lockName); }
@Override public RLock getLock(K key) { String lockName = getLockName(key, "lock"); return new RedissonLock(commandExecutor, lockName); }
@Override public RCountDownLatch getCountDownLatch(K key) { String lockName = getLockName(key, "countdownlatch"); return new RedissonCountDownLatch(commandExecutor, lockName); }
@Override public RPermitExpirableSemaphore getPermitExpirableSemaphore(V value) { String lockName = getLockName(value, "permitexpirablesemaphore"); return new RedissonPermitExpirableSemaphore(commandExecutor, lockName, ((Redisson)redisson).getSemaphorePubSub()); }
@Override public RPermitExpirableSemaphore getPermitExpirableSemaphore(K key) { String lockName = getLockName(key, "permitexpirablesemaphore"); return new RedissonPermitExpirableSemaphore(commandExecutor, lockName, ((Redisson)redisson).getSemaphorePubSub()); }
@Override public RSemaphore getSemaphore(V value) { String lockName = getLockName(value, "semaphore"); return new RedissonSemaphore(commandExecutor, lockName, ((Redisson)redisson).getSemaphorePubSub()); }
@Override public RSemaphore getSemaphore(V value) { String lockName = getLockName(value, "semaphore"); return new RedissonSemaphore(commandExecutor, lockName, ((Redisson)redisson).getSemaphorePubSub()); }
@Override public RSemaphore getSemaphore(K key) { String lockName = getLockName(key, "semaphore"); return new RedissonSemaphore(commandExecutor, lockName, ((Redisson)redisson).getSemaphorePubSub()); }
@Override public RPermitExpirableSemaphore getPermitExpirableSemaphore(V value) { String lockName = getLockName(value, "permitexpirablesemaphore"); return new RedissonPermitExpirableSemaphore(commandExecutor, lockName, ((Redisson)redisson).getSemaphorePubSub()); }