@Override public void unlock() { List<RFuture<Void>> futures = new ArrayList<RFuture<Void>>(locks.size()); for (RLock lock : locks) { futures.add(lock.unlockAsync()); } for (RFuture<Void> future : futures) { future.syncUninterruptibly(); } }
protected void unlockInner(Collection<RLock> locks) { List<RFuture<Void>> futures = new ArrayList<RFuture<Void>>(locks.size()); for (RLock lock : locks) { futures.add(lock.unlockAsync()); } for (RFuture<Void> unlockFuture : futures) { unlockFuture.awaitUninterruptibly(); } }
@Override public void rollback(CommandAsyncExecutor commandExecutor) { RSetCache<Object> set = new RedissonSetCache<Object>(codec, null, commandExecutor, name, null); getLock(set, commandExecutor, value).unlockAsync(); }
@Override public void rollback(CommandAsyncExecutor commandExecutor) { RSet<Object> set = new RedissonSet<Object>(codec, commandExecutor, name, null); getLock(set, commandExecutor, value).unlockAsync(); }
@Override public void rollback(CommandAsyncExecutor commandExecutor) { RSet<Object> set = new RedissonSet<Object>(codec, commandExecutor, name, null); RSet<Object> destinationSet = new RedissonSet<Object>(codec, commandExecutor, destinationName, null); getLock(destinationSet, commandExecutor, value).unlockAsync(threadId); getLock(set, commandExecutor, value).unlockAsync(threadId); }
@Override public void rollback(CommandAsyncExecutor commandExecutor) { RSet<Object> set = new RedissonSet<Object>(codec, commandExecutor, name, null); getLock(set, commandExecutor, value).unlockAsync(); }
@Override public void rollback(CommandAsyncExecutor commandExecutor) { RSetCache<Object> set = new RedissonSetCache<Object>(codec, null, commandExecutor, name, null); getLock(set, commandExecutor, value).unlockAsync(); }
@Override public void rollback(CommandAsyncExecutor commandExecutor) { RSet<Object> set = new RedissonSet<Object>(codec, commandExecutor, name, null); RSet<Object> destinationSet = new RedissonSet<Object>(codec, commandExecutor, destinationName, null); getLock(destinationSet, commandExecutor, value).unlockAsync(threadId); getLock(set, commandExecutor, value).unlockAsync(threadId); }
@Override public void rollback(CommandAsyncExecutor commandExecutor) { RMap<Object, Object> map = getMap(commandExecutor); getLock(map, commandExecutor, key).unlockAsync(); }
@Override public void rollback(CommandAsyncExecutor commandExecutor) { RSetCache<Object> set = new RedissonSetCache<Object>(codec, null, commandExecutor, name, null); getLock(set, commandExecutor, value).unlockAsync(); }
@Override public void commit(CommandAsyncExecutor commandExecutor) { RSet<Object> set = new RedissonSet<Object>(codec, commandExecutor, name, null); set.removeAsync(value); getLock(set, commandExecutor, value).unlockAsync(); }
@Override public final void commit(CommandAsyncExecutor commandExecutor) { RMap<Object, Object> map = getMap(commandExecutor); commit(map); getLock(map, commandExecutor, key).unlockAsync(); }
@Override public void commit(CommandAsyncExecutor commandExecutor) { RSet<Object> set = new RedissonSet<Object>(codec, commandExecutor, name, null); set.addAsync(value); getLock(set, commandExecutor, value).unlockAsync(); }
@Override public void commit(CommandAsyncExecutor commandExecutor) { RSetCache<Object> set = new RedissonSetCache<Object>(codec, null, commandExecutor, name, null); set.removeAsync(value); getLock(set, commandExecutor, value).unlockAsync(); }
@Override public void commit(CommandAsyncExecutor commandExecutor) { RSet<Object> set = new RedissonSet<Object>(codec, commandExecutor, name, null); RSet<Object> destinationSet = new RedissonSet<Object>(codec, commandExecutor, destinationName, null); set.moveAsync(destinationSet.getName(), value); getLock(destinationSet, commandExecutor, value).unlockAsync(threadId); getLock(set, commandExecutor, value).unlockAsync(threadId); }
@Override public final void commit(CommandAsyncExecutor commandExecutor) { RMap<Object, Object> map = getMap(commandExecutor); commit(map); getLock(map, commandExecutor, key).unlockAsync(); }
@Override public void commit(CommandAsyncExecutor commandExecutor) { RSet<Object> set = new RedissonSet<Object>(codec, commandExecutor, name, null); RSet<Object> destinationSet = new RedissonSet<Object>(codec, commandExecutor, destinationName, null); set.moveAsync(destinationSet.getName(), value); getLock(destinationSet, commandExecutor, value).unlockAsync(threadId); getLock(set, commandExecutor, value).unlockAsync(threadId); }
@Override public void commit(CommandAsyncExecutor commandExecutor) { RSet<Object> set = new RedissonSet<Object>(codec, commandExecutor, name, null); set.addAsync(value); getLock(set, commandExecutor, value).unlockAsync(); }
@Override public void commit(CommandAsyncExecutor commandExecutor) { RSetCache<Object> set = new RedissonSetCache<Object>(codec, null, commandExecutor, name, null); if (timeUnit != null) { set.addAsync(value, ttl, timeUnit); } else { set.addAsync(value); } getLock(set, commandExecutor, value).unlockAsync(); }
@Override public void commit(CommandAsyncExecutor commandExecutor) { RSetCache<Object> set = new RedissonSetCache<Object>(codec, null, commandExecutor, name, null); if (timeUnit != null) { set.addAsync(value, ttl, timeUnit); } else { set.addAsync(value); } getLock(set, commandExecutor, value).unlockAsync(); }