Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4d826ec

Browse files
Merge pull request Snailclimb#611 from jiabinl/master
Fix wrong if statement in Redis.md
2 parents 191c618 + 51072eb commit 4d826ec

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎docs/database/Redis/Redis.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ public Object getObjectInclNullById(Integer id) {
304304
// 从缓存中获取数据
305305
Object cacheValue = cache.get(id);
306306
// 缓存为空
307-
if (cacheValue != null) {
307+
if (cacheValue == null) {
308308
// 从数据库中获取
309309
Object storageValue = storage.get(key);
310310
// 缓存空对象
@@ -367,4 +367,4 @@ public Object getObjectInclNullById(Integer id) {
367367

368368
**Java工程师必备学习资源:** 一些Java工程师常用学习资源公众号后台回复关键字 **"1"** 即可免费无套路获取。
369369

370-
![我的公众号](https://my-blog-to-use.oss-cn-beijing.aliyuncs.com/2019-6/167598cd2e17b8ec.png)
370+
![我的公众号](https://my-blog-to-use.oss-cn-beijing.aliyuncs.com/2019-6/167598cd2e17b8ec.png)

‎docs/java/Multithread/java线程池学习总结.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,9 +652,9 @@ Wed Nov 13 13:40:43 CST 2019::pool-1-thread-5
652652
2. 当前线程池中有一个运行的线程后,将任务加入 `LinkedBlockingQueue`
653653
3. 线程执行完当前的任务后,会在循环中反复从` LinkedBlockingQueue` 中获取任务来执行;
654654

655-
#### 5.2.3 为什么不推荐使用`FixedThreadPool`?
655+
#### 5.2.3 为什么不推荐使用`SingleThreadExecutor`?
656656

657-
`SingleThreadExecutor` 使用无界队列 `LinkedBlockingQueue` 作为线程池的工作队列(队列的容量为 Intger.MAX_VALUE)。`SingleThreadExecuto`r 使用无界队列作为线程池的工作队列会对线程池带来的影响与 `FixedThreadPool` 相同。说简单点就是可能会导致 OOM,
657+
`SingleThreadExecutor` 使用无界队列 `LinkedBlockingQueue` 作为线程池的工作队列(队列的容量为 Intger.MAX_VALUE)。`SingleThreadExecutor` 使用无界队列作为线程池的工作队列会对线程池带来的影响与 `FixedThreadPool` 相同。说简单点就是可能会导致 OOM,
658658

659659
### 5.3 CachedThreadPool 详解
660660

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /