Search in sources :

Example 6 with RedissonLock

use of org.redisson.RedissonLock in project redisson by redisson.

the class BucketTrySetOperation method rollback.

@Override
public void rollback(CommandAsyncExecutor commandExecutor) {
    RedissonLock lock = new RedissonTransactionalLock(commandExecutor, lockName, transactionId);
    lock.unlockAsync(getThreadId());
}
Also used : RedissonLock(org.redisson.RedissonLock) RedissonTransactionalLock(org.redisson.transaction.RedissonTransactionalLock)

Example 7 with RedissonLock

use of org.redisson.RedissonLock in project redisson by redisson.

the class TouchOperation method rollback.

@Override
public void rollback(CommandAsyncExecutor commandExecutor) {
    RedissonLock lock = new RedissonLock(commandExecutor, lockName);
    lock.unlockAsync(getThreadId());
}
Also used : RedissonLock(org.redisson.RedissonLock)

Example 8 with RedissonLock

use of org.redisson.RedissonLock in project redisson by redisson.

the class TouchOperation method commit.

@Override
public void commit(CommandAsyncExecutor commandExecutor) {
    RKeys keys = new RedissonKeys(commandExecutor);
    keys.touchAsync(getName());
    RedissonLock lock = new RedissonLock(commandExecutor, lockName);
    lock.unlockAsync(getThreadId());
}
Also used : RKeys(org.redisson.api.RKeys) RedissonLock(org.redisson.RedissonLock) RedissonKeys(org.redisson.RedissonKeys)

Example 9 with RedissonLock

use of org.redisson.RedissonLock in project redisson by redisson.

the class UnlinkOperation method commit.

@Override
public void commit(CommandAsyncExecutor commandExecutor) {
    RKeys keys = new RedissonKeys(commandExecutor);
    keys.unlinkAsync(getName());
    if (lockName != null) {
        RedissonLock lock = new RedissonLock(commandExecutor, lockName);
        lock.unlockAsync(getThreadId());
    }
}
Also used : RKeys(org.redisson.api.RKeys) RedissonLock(org.redisson.RedissonLock) RedissonKeys(org.redisson.RedissonKeys)

Example 10 with RedissonLock

use of org.redisson.RedissonLock in project redisson by redisson.

the class BucketCompareAndSetOperation method rollback.

@Override
public void rollback(CommandAsyncExecutor commandExecutor) {
    RedissonLock lock = new RedissonTransactionalLock(commandExecutor, lockName, transactionId);
    lock.unlockAsync(getThreadId());
}
Also used : RedissonLock(org.redisson.RedissonLock) RedissonTransactionalLock(org.redisson.transaction.RedissonTransactionalLock)

Aggregations

RedissonLock (org.redisson.RedissonLock)16 RedissonTransactionalLock (org.redisson.transaction.RedissonTransactionalLock)12 RedissonBucket (org.redisson.RedissonBucket)5 RedissonKeys (org.redisson.RedissonKeys)3 RKeys (org.redisson.api.RKeys)3