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

Appearance settings

Commit 6cbcb87

Browse filesBrowse files
committed
添加demo类
1 parent eb95b38 commit 6cbcb87
Copy full SHA for 6cbcb87

File tree

Expand file treeCollapse file tree

3 files changed

+19
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+19
-1
lines changed
Open diff view settings
Collapse file
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.learnjava.concurent;
2+
3+
/**
4+
* @Description
5+
* @Author luohaiyang
6+
* @Date 2022/4/7
7+
*/
8+
public class ReentrantLockDemo {
9+
}
Collapse file

‎JdkLearn/src/main/java/com/learnjava/concurent/SnowIdUtils.java‎

Copy file name to clipboardExpand all lines: JdkLearn/src/main/java/com/learnjava/concurent/SnowIdUtils.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ private SnowFlake() {
5858
// String ip = instance.getDockerIp().replace(".", "");
5959
// 模拟获取机器节点ip
6060
String ip = "127.0.0.1";
61-
long localIp = Long.valueOf(ip.replace(".", ""));
61+
long localIp = Long.parseLong(ip.replace(".", ""));
6262
machineIdPart = (localIp & MAX_MACHINE_ID) << SEQUENCE_BIT;
6363
}
6464
/**
Collapse file
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.learnjava.concurent;
2+
3+
/**
4+
* @Description
5+
* @Author luohaiyang
6+
* @Date 2022/4/7
7+
*/
8+
public class SynchronizeDemo {
9+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.