com.lomagicode.redlock.spring.boot.autoconfigure.RedisLockServiceBean Maven / Gradle / Ivy
package com.lomagicode.redlock.spring.boot.autoconfigure;
import java.util.UUID;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import javax.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.ClassPathResource;
import org.springframework.data.redis.connection.RedisStringCommands;
import org.springframework.data.redis.connection.ReturnType;
import org.springframework.data.redis.connection.lettuce.LettuceConverters;
import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.script.DefaultRedisScript;
import org.springframework.data.redis.core.types.Expiration;
/**
* Created on Sep 18, 2018
*
* @author Chuan Qin
*/
public class RedisLockServiceBean implements RedisLockService {
private static final Logger LOGGER = LoggerFactory.getLogger(RedisLockServiceBean.class);
private ThreadLocal value = new ThreadLocal<>();
private RedisTemplate
© 2015 - 2025 Weber Informatics LLC | Privacy Policy