-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
2811 lines (1329 loc) · 69.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>日拱一兵|Java|Spring Boot|Java并发编程|最新干货分享</title>
<meta name="keywords" content="Java,SpringBoot,并发编程, ElasticSearch, 日拱一兵">
<meta name="description" content="本站是日拱一兵的技术分享博客,内容涵盖Java后端技术、Spring Boot、Java并发编程等技术研究与分享,用有趣的方式解读技术">
<link rel="alternate" href="/atom.xml" title="日拱一兵|Java|Spring Boot|Java并发编程|最新干货分享" type="application/atom+xml">
<meta name="HandheldFriendly" content="True" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- meta -->
<!-- link -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/[email protected]/dist/jquery.fancybox.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/waves.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css">
<link rel="shortcut icon" type='image/x-icon' href="https://cdn.jsdelivr.net/gh/xaoxuu/assets@master/favicon/favicon.ico">
<link rel="stylesheet" href="/style.css">
<script>
function setLoadingBarProgress(num) {
document.getElementById('loading-bar').style.width=num+"%";
}
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-147539283-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-147539283-1');
</script>
<!-- ba -->
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?f553477a3dc5ab3837e9a4dead4e0bc7";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-1774278264048334",
enable_page_level_ads: true
});
</script>
<script>
(function(i,s,o,g,r,a,m){i["DaoVoiceObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;a.charset="utf-8";m.parentNode.insertBefore(a,m)})(window,document,"script",('https:' == document.location.protocol ? 'https:' : 'http:') + "//widget.daovoice.io/widget/0f81ff2f.js","daovoice")
daovoice('init', {
app_id: "8a3d6849"
});
daovoice('update');
</script>
<meta name="generator" content="Hexo 5.4.0"></head>
<body>
<div class="cover-wrapper">
<cover class='cover half'>
<img class='logo' src='/assets/logo.png'/>
<div class="m_search">
<form name="searchform" class="form u-search-form">
<input type="text" class="input u-search-input" placeholder="世界很大,搜索一下" />
<i class="icon fas fa-search fa-fw"></i>
</form>
</div>
<div class='menu navgation'>
<ul class='h-list'>
<li>
<a class="nav home" href="/"
rel="nofollow"
id="home">
<i class='fas fa-home fa-fw'></i> 主页
</a>
</li>
<li>
<a class="nav home" href="/categories/"
rel="nofollow"
id="categories">
<i class='fas fa-folder-open fa-fw'></i> 分类
</a>
</li>
<li>
<a class="nav home" href="/tags/"
rel="nofollow"
id="tags">
<i class='fas fa-tags fa-fw'></i> 标签
</a>
</li>
<li>
<a class="nav home" href="/archives/"
rel="nofollow"
id="archives">
<i class='fas fa-archive fa-fw'></i> 归档
</a>
</li>
<li>
<a class="nav home" href="/comments/"
rel="nofollow"
id="comments">
<i class='fas fa-comments fa-fw'></i> 留言板
</a>
</li>
</ul>
</div>
<br>
<div class="description center-align">
<span id="typed"></span>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script>
var typed = new Typed("#typed", {
strings: ['从来没有真正的绝境, 只有心灵的迷途', 'Never really desperate, only the lost of the soul'],
startDelay: 300,
typeSpeed: 100,
loop: true,
backSpeed: 50,
showCursor: true
});
</script>
</div>
</cover>
<header class="l_header pure">
<div id="loading-bar-wrapper">
<div id="loading-bar" class="pure"></div>
</div>
<div class='wrapper'>
<div class="nav-main container container--flex">
<a class="logo flat-box" href='/' >
日拱一兵
</a>
<div class='menu navgation'>
<ul class='h-list'>
<li>
<a class="nav flat-box" href="/"
rel="nofollow"
id="home">
<i class='fas fa-home fa-fw'></i> 主页
</a>
</li>
<li>
<a class="nav flat-box" href="/categories/"
rel="nofollow"
id="categories">
<i class='fas fa-folder-open fa-fw'></i> 分类
</a>
</li>
<li>
<a class="nav flat-box" href="/tags/"
rel="nofollow"
id="tags">
<i class='fas fa-tags fa-fw'></i> 标签
</a>
</li>
<li>
<a class="nav flat-box" href="/archives/"
rel="nofollow"
id="archives">
<i class='fas fa-archive fa-fw'></i> 归档
</a>
</li>
<li>
<a class="nav flat-box" href="/friends/"
rel="nofollow"
id="friends">
<i class='fas fa-link fa-fw'></i> 友链
</a>
</li>
<li>
<a class="nav flat-box" href="/comments/"
rel="nofollow"
id="comments">
<i class='fas fa-comments fa-fw'></i> 留言板
</a>
</li>
</ul>
</div>
<div class="m_search">
<form name="searchform" class="form u-search-form">
<input type="text" class="input u-search-input" placeholder="搜索" />
<i class="icon fas fa-search fa-fw"></i>
</form>
</div>
<ul class='switcher h-list'>
<li class='s-search'><a class="fas fa-search fa-fw" href='javascript:void(0)'></a></li>
<li class='s-menu'><a class="fas fa-bars fa-fw" href='javascript:void(0)'></a></li>
</ul>
</div>
<div class='nav-sub container container--flex'>
<a class="logo flat-box"></a>
<ul class='switcher h-list'>
<li class='s-comment'><a class="flat-btn fas fa-comments fa-fw" href='javascript:void(0)'></a></li>
<li class='s-toc'><a class="flat-btn fas fa-list fa-fw" href='javascript:void(0)'></a></li>
</ul>
</div>
</div>
</header>
<aside class="menu-phone">
<header>
<nav class="menu navgation">
<ul>
<li>
<a class="nav flat-box" href="/"
rel="nofollow"
id="home">
<i class='fas fa-clock fa-fw'></i> 近期文章
</a>
</li>
<li>
<a class="nav flat-box" href="/categories/"
rel="nofollow"
id="categories">
<i class='fas fa-folder-open fa-fw'></i> 分类
</a>
</li>
<li>
<a class="nav flat-box" href="/tags/"
rel="nofollow"
id="tags">
<i class='fas fa-tags fa-fw'></i> 标签
</a>
</li>
<li>
<a class="nav flat-box" href="/archives/"
rel="nofollow"
id="archives">
<i class='fas fa-archive fa-fw'></i> 归档
</a>
</li>
<li>
<a class="nav flat-box" href="/friends/"
rel="nofollow"
id="friends">
<i class='fas fa-link fa-fw'></i> 友链
</a>
</li>
<li>
<a class="nav flat-box" href="/comments/"
rel="nofollow"
id="comments">
<i class='fas fa-comments fa-fw'></i> 留言板
</a>
</li>
</ul>
</nav>
</header>
</aside>
<script>setLoadingBarProgress(40);</script>
</div>
<div class="l_body">
<div class='body-wrapper'>
<div class='l_main'>
<section class="post-list">
<div class='post-wrapper'>
<article class="post reveal ">
<section class='meta'>
<a title='120000字,你们要的Java并发编程图文小册来了' href='/p/java-concurrency-book.html'><img class='thumbnail' src='https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-imgconcurrency.png'></a>
<div class="meta" id="header-meta">
<h2 class="title">
<a href="/p/java-concurrency-book.html">
120000字,你们要的Java并发编程图文小册来了
</a>
</h2>
<div class='new-meta-box'>
<div class='new-meta-item author'>
<a href="https://dayarch.top" rel="nofollow">
<img src="https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-imgavatar.png">
<p>tanθ</p>
</a>
</div>
<div class="new-meta-item date">
<a class='notlink'>
<i class="fas fa-calendar-alt" aria-hidden="true"></i>
<p>2021-03-07</p>
</a>
</div>
<div class='new-meta-item category'>
<a href='/categories/Coding/Java-Concurrency/' rel="nofollow">
<i class="fas fa-folder-open" aria-hidden="true"></i>
<p>Coding / Java-Concurrency</p>
</a>
</div>
<div class="new-meta-item top-post">
<a class='notlink'>
<i class="fas fa-angle-double-up" aria-hidden="true"></i>
<p>置顶</p>
</a>
</div>
</div>
<hr>
</div>
</section>
<section class="article typo">
<div class="article-entry" itemprop="articleBody">
关注公众号:日拱一兵 并设置为星标,回复 并发小册即可获取,希望这次我们不一样
Java 有并发,并发知识之大,一口吃不下
这曾是我不愿意触碰的知识角
多次一头扎进并发,无功而返
为应对面试,临时苦苦记忆,不成体系
这一次我决定从基础开始,攻克它
12,0000 字
68Mb 高清无水印图文
2021 年刚开始
日拱一兵免费送上整理好的小册
这次希望我们不一样
思维导图——理清脉络
知识讲解——循序渐进
抽象问题——图文并茂
实现细节——源码分析
「态度」夫夷以近,则游者众;险以远,则至者少。而世之奇伟、瑰怪,非常之观,常在于险远,而人之所罕至焉,故非有志者不能至
<div class="readmore">
<a href="/p/java-concurrency-book.html" class="flat-box">
<i class="fas fa-book-open fa-fw" aria-hidden="true"></i>
阅读全文
</a>
</div>
</div>
<div class="full-width auto-padding tags">
<a href="/tags/Java-Concurrency/" rel="nofollow"><i class="fas fa-tag fa-fw"></i> Java-Concurrency</a>
</div>
</section>
</article>
</div>
<div class='post-wrapper'>
<article class="post reveal ">
<section class='meta'>
<div class="meta" id="header-meta">
<h2 class="title">
<a href="/p/highlight-tool-weava.html">
爱不释手的网页荧光标记工具
</a>
</h2>
<div class='new-meta-box'>
<div class='new-meta-item author'>
<a href="https://dayarch.top" rel="nofollow">
<img src="https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-imgavatar.png">
<p>tanθ</p>
</a>
</div>
<div class="new-meta-item date">
<a class='notlink'>
<i class="fas fa-calendar-alt" aria-hidden="true"></i>
<p>2021-12-30</p>
</a>
</div>
<div class='new-meta-item category'>
<a href='/categories/Coding/Tools/' rel="nofollow">
<i class="fas fa-folder-open" aria-hidden="true"></i>
<p>Coding / Tools</p>
</a>
</div>
</div>
<hr>
</div>
</section>
<section class="article typo">
<div class="article-entry" itemprop="articleBody">
无意间被同事看到,惊呼,你是怎么在网页上做标记的?
这其实是我个人浏览网页,每日浏览大量信息,从中标记重要信息必备的工具
个人痛点
1. 每日要浏览很多网页或者查阅资料,浏览过后重新定位重要信息又要费时查找
2. 虽然印象笔记或有道笔记插件可以做摘录,但当查找信息时,要在多个应用之间切换,显得不够流畅
3. 读文章没办法标记重要信息,在大脑中串联上下文
总之我需要一个可以简化研究过程,提升工作效率,让我不再费时追踪资料来源、复制粘贴及引文的工具
Weava
Weava 是一个 Chrome 浏览器的插件|扩展,它就是可以帮我解决上述痛点的工具,说的再具体一点,它可以:
1
<div class="readmore">
<a href="/p/highlight-tool-weava.html" class="flat-box">
<i class="fas fa-book-open fa-fw" aria-hidden="true"></i>
阅读全文
</a>
</div>
</div>
<div class="full-width auto-padding tags">
<a href="/tags/%E5%B7%A5%E5%85%B7/" rel="nofollow"><i class="fas fa-tag fa-fw"></i> 工具</a>
</div>
</section>
</article>
</div>
<div class='post-wrapper'>
<article class="post reveal ">
<section class='meta'>
<a title='锁记————偏向锁注定过不好这一生' href='/p/java-biased-lock.html'><img class='thumbnail' src='https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-imgconcurrency.png'></a>
<div class="meta" id="header-meta">
<h2 class="title">
<a href="/p/java-biased-lock.html">
锁记————偏向锁注定过不好这一生
</a>
</h2>
<div class='new-meta-box'>
<div class='new-meta-item author'>
<a href="https://dayarch.top" rel="nofollow">
<img src="https://cdn.jsdelivr.net/gh/FraserYu/img-host/blog-imgavatar.png">
<p>tanθ</p>
</a>
</div>
<div class="new-meta-item date">
<a class='notlink'>
<i class="fas fa-calendar-alt" aria-hidden="true"></i>
<p>2021-12-25</p>
</a>
</div>
<div class='new-meta-item category'>
<a href='/categories/Coding/Java-Concurrency/' rel="nofollow">
<i class="fas fa-folder-open" aria-hidden="true"></i>
<p>Coding / Java-Concurrency</p>
</a>
</div>
</div>
<hr>
</div>
</section>
<section class="article typo">
<div class="article-entry" itemprop="articleBody">
背景
在 JDK1.5 之前,面对 Java 并发问题, synchronized 是一招鲜的解决方案:
1. 普通同步方法,锁上当前实例对象
2. 静态同步方法,锁上当前类 Class 对象
3. 同步块,锁上括号里面配置的对象
拿同步块来举例:
1
2
3
4
5
public void test(){
synchronized (object) {
i++;
}
}
经过 javap -v 编译后的指令如下:
monitorenter 指令是在编译后插入到同步代码块的开始位置;monitorexit是插入到方法结束和异常的位置(实际隐藏了try-
<div class="readmore">
<a href="/p/java-biased-lock.html" class="flat-box">
<i class="fas fa-book-open fa-fw" aria-hidden="true"></i>
阅读全文
</a>