!6 双重校验锁问题

Merge pull request !6 from weiwei/master
This commit is contained in:
轨迹 2018-09-19 19:25:47 +08:00
commit 65b6594c70
3 changed files with 4 additions and 4 deletions

View File

@ -29,9 +29,9 @@ public class JedisTemplate implements Serializable{
private static final long serialVersionUID = 9135301078135982677L;
private static final Logger logger = LoggerFactory.getLogger(JedisTemplate.class);
private static JedisTemplate instance = null;
private static volatile JedisTemplate instance = null;
private static JedisPool jedisPool = null;
private static Jedis jedis = null;
private static volatile Jedis jedis = null;
private static RedisConfiguration redisConfig = null;
private JedisTemplate (){}

View File

@ -16,7 +16,7 @@ public class RedissonTemplate implements Serializable{
private static final long serialVersionUID = -4528751601700736437L;
private static final Logger logger = LoggerFactory.getLogger(RedissonTemplate.class);
private static RedissonTemplate instance = null;
private static volatile RedissonTemplate instance = null;
private static RedisConfiguration redisConfig = null;
private static final String REDIS = "redis";
private static RedissonClient redissonClient = null;

View File

@ -37,7 +37,7 @@ public class HttpResponse extends HttpPacket {
private boolean isStaticRes = false;
private HttpRequest request = null;
private List<Cookie> cookies = null;
private volatile List<Cookie> cookies = null;
// private int contentLength;
// private byte[] bodyBytes;