use of org.redisson.RedissonBucket in project redisson by redisson.
the class BucketGetAndDeleteOperation method commit.
@Override
public void commit(CommandAsyncExecutor commandExecutor) {
RedissonBucket<V> bucket = new RedissonBucket<V>(codec, commandExecutor, name);
bucket.getAndDeleteAsync();
RedissonLock lock = new RedissonTransactionalLock(commandExecutor, lockName, transactionId);
lock.unlockAsync(getThreadId());
}
use of org.redisson.RedissonBucket in project redisson by redisson.
the class BucketSetOperation method commit.
@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 RedissonTransactionalLock(commandExecutor, lockName, transactionId);
lock.unlockAsync(getThreadId());
}
use of org.redisson.RedissonBucket in project redisson by redisson.
the class BucketCompareAndSetOperation method commit.
@Override
public void commit(CommandAsyncExecutor commandExecutor) {
RedissonBucket<V> bucket = new RedissonBucket<V>(codec, commandExecutor, name);
bucket.compareAndSetAsync(expected, value);
RedissonLock lock = new RedissonTransactionalLock(commandExecutor, lockName, transactionId);
lock.unlockAsync(getThreadId());
}
use of org.redisson.RedissonBucket in project redisson by redisson.
the class BucketGetAndSetOperation method commit.
@Override
public void commit(CommandAsyncExecutor commandExecutor) {
RBucket<V> bucket = new RedissonBucket<V>(codec, commandExecutor, name);
if (timeToLive != 0) {
bucket.getAndSetAsync((V) value, timeToLive, timeUnit);
} else {
bucket.getAndSetAsync((V) value);
}
RedissonLock lock = new RedissonTransactionalLock(commandExecutor, lockName, transactionId);
lock.unlockAsync(getThreadId());
}
use of org.redisson.RedissonBucket in project redisson by redisson.
the class BucketTrySetOperation method commit.
@Override
public void commit(CommandAsyncExecutor commandExecutor) {
RedissonBucket<V> bucket = new RedissonBucket<V>(codec, commandExecutor, name);
if (timeToLive != 0) {
bucket.trySetAsync((V) value, timeToLive, timeUnit);
} else {
bucket.trySetAsync((V) value);
}
RedissonLock lock = new RedissonTransactionalLock(commandExecutor, lockName, transactionId);
lock.unlockAsync(getThreadId());
}
Aggregations