From c68f07d453813c8a26a51fd2d9887a6290bc73b8 Mon Sep 17 00:00:00 2001
From: hz21056617 <1IB76X4g7T>
Date: Tue, 22 Feb 2022 17:25:57 +0800
Subject: [PATCH] 111
---
.../java/concurrent/hashmap/HashMapTest.java | 25 +++++++++++++++++++
elasticsearch/pom.xml | 8 +++++-
2 files changed, 32 insertions(+), 1 deletion(-)
create mode 100644 concurrent/src/test/java/concurrent/hashmap/HashMapTest.java
diff --git a/concurrent/src/test/java/concurrent/hashmap/HashMapTest.java b/concurrent/src/test/java/concurrent/hashmap/HashMapTest.java
new file mode 100644
index 0000000..831cd56
--- /dev/null
+++ b/concurrent/src/test/java/concurrent/hashmap/HashMapTest.java
@@ -0,0 +1,25 @@
+package concurrent.hashmap;
+
+
+import org.junit.jupiter.api.Test;
+
+public class HashMapTest {
+ static final int MAXIMUM_CAPACITY = 1 << 30;
+
+ @Test
+ public void LinkedBlockingQueueModelTest() throws InterruptedException {
+ System.out.println(tableSizeFor(1000));
+ }
+
+ static final int tableSizeFor(int cap) {
+ int n = cap - 1;
+ n |= n >>> 1;
+ n |= n >>> 2;
+ n |= n >>> 4;
+ n |= n >>> 8;
+ n |= n >>> 16;
+ int t = (n < 0) ? 1 : (n >= MAXIMUM_CAPACITY) ? MAXIMUM_CAPACITY : n + 1;
+ return t;
+ }
+
+}
diff --git a/elasticsearch/pom.xml b/elasticsearch/pom.xml
index 8991654..ec690dd 100644
--- a/elasticsearch/pom.xml
+++ b/elasticsearch/pom.xml
@@ -15,5 +15,11 @@
8
8
-
+
+
+ org.jeecgframework.jimureport
+ jimureport-spring-boot-starter
+ 1.4.2
+
+
\ No newline at end of file