Feature - touch(), unlink() and delete() methods implemented for RedissonTransactionalSetCache and RedissonTransactionalSet objects
parent
e6b37c47a9
commit
dc4d0729be
@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2013-2021 Nikita Koksharov
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.redisson.transaction;
|
||||||
|
|
||||||
|
import org.redisson.RedissonReadLock;
|
||||||
|
import org.redisson.command.CommandAsyncExecutor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Nikita Koksharov
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class RedissonTransactionalReadLock extends RedissonReadLock {
|
||||||
|
|
||||||
|
private final String transactionId;
|
||||||
|
|
||||||
|
public RedissonTransactionalReadLock(CommandAsyncExecutor commandExecutor, String name, String transactionId) {
|
||||||
|
super(commandExecutor, name);
|
||||||
|
this.transactionId = transactionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getLockName(long threadId) {
|
||||||
|
return super.getLockName(threadId) + ":" + transactionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2013-2021 Nikita Koksharov
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.redisson.transaction;
|
||||||
|
|
||||||
|
import org.redisson.RedissonWriteLock;
|
||||||
|
import org.redisson.command.CommandAsyncExecutor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Nikita Koksharov
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class RedissonTransactionalWriteLock extends RedissonWriteLock {
|
||||||
|
|
||||||
|
private final String transactionId;
|
||||||
|
|
||||||
|
public RedissonTransactionalWriteLock(CommandAsyncExecutor commandExecutor, String name, String transactionId) {
|
||||||
|
super(commandExecutor, name);
|
||||||
|
this.transactionId = transactionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getLockName(long threadId) {
|
||||||
|
return super.getLockName(threadId) + ":" + transactionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue