com.nepxion.aquarius.lock.redis.config.RedisLockConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aquarius-lock-redis Show documentation
Show all versions of aquarius-lock-redis Show documentation
Nepxion Aquarius is a list of distribution components based on Redis + Zookeeper with Nepxion Matrix AOP framework
package com.nepxion.aquarius.lock.redis.config;
/**
* Title: Nepxion Aquarius
* Description: Nepxion Aquarius
* Copyright: Copyright (c) 2017-2050
* Company: Nepxion
* @author Haojun Ren
* @version 1.0
*/
import org.redisson.api.RLock;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import com.nepxion.aquarius.common.redisson.handler.RedissonHandler;
import com.nepxion.aquarius.lock.LockDelegate;
import com.nepxion.aquarius.lock.LockExecutor;
import com.nepxion.aquarius.lock.redis.condition.RedisLockCondition;
import com.nepxion.aquarius.lock.redis.impl.RedisLockDelegateImpl;
import com.nepxion.aquarius.lock.redis.impl.RedisLockExecutorImpl;
@Configuration
@Import({ com.nepxion.aquarius.common.config.AquariusConfig.class })
public class RedisLockConfig {
@Bean(name = "redisLockDelegate")
@Conditional(RedisLockCondition.class)
public LockDelegate redisLockDelegate() {
return new RedisLockDelegateImpl();
}
@Bean(name = "redisLockExecutor")
@Conditional(RedisLockCondition.class)
public LockExecutor redisLockExecutor() {
return new RedisLockExecutorImpl();
}
@Bean(name = "redissonHandler")
@Conditional(RedisLockCondition.class)
public RedissonHandler redissonHandler() {
return new RedissonHandler();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy