mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-18 04:28:40 +00:00
ref[cache]: use LazyCache instead of Caffeine
This commit is contained in:
@@ -106,7 +106,7 @@ NetContext.getCosumer()
|
||||
HotSwapUtils.hotswapClass(bytes);
|
||||
```
|
||||
|
||||
#### 4. [orm](orm/README.md) automatic mapping framework based on mongodb, The secondary cache is designed using [caffeine](https://github.com/ben-manes/caffeine) to fully release the database pressure
|
||||
#### 4. [orm](orm/README.md) automatic mapping framework based on mongodb
|
||||
|
||||
```
|
||||
// You don't need to write sql and any configuration yourself, define a table in the database directly through annotation definitions
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ NetContext.getCosumer()
|
||||
HotSwapUtils.hotswapClass(bytes);
|
||||
```
|
||||
|
||||
#### 4. [orm](orm/README.md) 基于mongodb的自动映射框架,使用 [caffeine](https://github.com/ben-manes/caffeine) 设计了二级缓存,充分释放数据库压力
|
||||
#### 4. [orm](orm/README.md) 基于mongodb的自动映射框架
|
||||
|
||||
```
|
||||
// 无需自己写sql和任何配置,直接通过注解定义在数据库中定义一张表
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
<curator.version>5.5.0</curator.version>
|
||||
<!-- hardware detection -->
|
||||
<oshi.version>6.4.5</oshi.version>
|
||||
<!-- cache -->
|
||||
<caffeine.version>3.1.8</caffeine.version>
|
||||
<!-- Office document parsing -->
|
||||
<poi.version>5.2.3</poi.version>
|
||||
<csv.version>1.10.0</csv.version>
|
||||
|
||||
@@ -2,8 +2,3 @@
|
||||
|
||||
- 考虑用javassist的方式支持protobuf,用约定大于配置的方式,还可以原生的和pojo对象结合起来
|
||||
- 通过protobuf的proto文件生成java的pojo源代码,通过动态编译java源代码的方式生成其它语言的源代码
|
||||
|
||||
|
||||
### orm
|
||||
|
||||
- 使用更高性能的Cache2k替换Caffeine
|
||||
@@ -72,7 +72,6 @@ java的线程池,SingleThreadScheduledExecutor,SingleThreadExecutor
|
||||
```
|
||||
Mysql中的数据库,表,一条数据,在Mongodb分别叫做,数据库,集合,文档
|
||||
Elastic Search的全文搜索引擎
|
||||
Java的缓存框架guava cache,还有它的升级版本caffeine
|
||||
mongodb的map reduce操作
|
||||
分布式唯一Id,Java自带的UUID,雪花算法(SnowFlake),Redis分布式唯一Id实现,Mongodb分布式唯一Id实现,Zookeeper分布式唯一Id实现
|
||||
```
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
<curator.version>5.5.0</curator.version>
|
||||
<!-- hardware detection -->
|
||||
<oshi.version>6.4.5</oshi.version>
|
||||
<!-- cache -->
|
||||
<caffeine.version>3.1.8</caffeine.version>
|
||||
<!-- Office document parsing -->
|
||||
<poi.version>5.2.3</poi.version>
|
||||
<csv.version>1.10.0</csv.version>
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
<curator.version>5.5.0</curator.version>
|
||||
<!-- hardware detection -->
|
||||
<oshi.version>6.4.5</oshi.version>
|
||||
<!-- cache -->
|
||||
<caffeine.version>3.1.8</caffeine.version>
|
||||
<!-- Office document parsing -->
|
||||
<poi.version>5.2.3</poi.version>
|
||||
<csv.version>1.10.0</csv.version>
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
<curator.version>5.5.0</curator.version>
|
||||
<!-- hardware detection -->
|
||||
<oshi.version>6.4.5</oshi.version>
|
||||
<!-- cache -->
|
||||
<caffeine.version>3.1.8</caffeine.version>
|
||||
<!-- Office document parsing -->
|
||||
<poi.version>5.2.3</poi.version>
|
||||
<csv.version>1.10.0</csv.version>
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
<curator.version>5.5.0</curator.version>
|
||||
<!-- hardware detection -->
|
||||
<oshi.version>6.4.5</oshi.version>
|
||||
<!-- cache -->
|
||||
<caffeine.version>3.1.8</caffeine.version>
|
||||
<!-- Office document parsing -->
|
||||
<poi.version>5.2.3</poi.version>
|
||||
<csv.version>1.10.0</csv.version>
|
||||
@@ -121,12 +119,6 @@
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||
<artifactId>caffeine</artifactId>
|
||||
<version>${caffeine.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
|
||||
@@ -5,7 +5,6 @@ English | [简体中文](./README_CN.md)
|
||||
- [orm](https://github.com/zfoo-project/zfoo/blob/main/orm/README.md) Based on MongoDB's orm framework, it provides a
|
||||
mapping between POJO objects and Mongo DB databases
|
||||
- MongoDB is a distributed database that can be used on a single machine or distributed in a single machine
|
||||
- High-performance database entity object caching based on [caffeine](https://github.com/ben-manes/caffeine)
|
||||
|
||||
### Ⅱ. Use
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
- [orm](https://github.com/zfoo-project/zfoo/blob/main/orm/README.md) 基于MongoDB的orm框架,提供POJO对象和MongoDB数据库之间的映射
|
||||
- mongodb是分布式数据库,可以单机使用,也可以分布式使用
|
||||
- 基于 [caffeine](https://github.com/ben-manes/caffeine) 的高性能数据库实体对象Entity缓存
|
||||
|
||||
### Ⅱ. 使用
|
||||
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
<curator.version>5.5.0</curator.version>
|
||||
<!-- hardware detection -->
|
||||
<oshi.version>6.4.5</oshi.version>
|
||||
<!-- cache -->
|
||||
<caffeine.version>3.1.8</caffeine.version>
|
||||
<!-- Office document parsing -->
|
||||
<poi.version>5.2.3</poi.version>
|
||||
<csv.version>1.10.0</csv.version>
|
||||
@@ -82,12 +80,6 @@
|
||||
<version>${zfoo.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||
<artifactId>caffeine</artifactId>
|
||||
<version>${caffeine.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.javassist</groupId>
|
||||
<artifactId>javassist</artifactId>
|
||||
|
||||
@@ -140,8 +140,6 @@
|
||||
<curator.version>5.5.0</curator.version>
|
||||
<!-- hardware detection -->
|
||||
<oshi.version>6.4.5</oshi.version>
|
||||
<!-- cache -->
|
||||
<caffeine.version>3.1.8</caffeine.version>
|
||||
<!-- Office document parsing -->
|
||||
<poi.version>5.2.3</poi.version>
|
||||
<csv.version>1.10.0</csv.version>
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
<curator.version>5.5.0</curator.version>
|
||||
<!-- hardware detection -->
|
||||
<oshi.version>6.4.5</oshi.version>
|
||||
<!-- cache -->
|
||||
<caffeine.version>3.1.8</caffeine.version>
|
||||
<!-- Office document parsing -->
|
||||
<poi.version>5.2.3</poi.version>
|
||||
<csv.version>1.10.0</csv.version>
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
<curator.version>5.5.0</curator.version>
|
||||
<!-- hardware detection -->
|
||||
<oshi.version>6.4.5</oshi.version>
|
||||
<!-- cache -->
|
||||
<caffeine.version>3.1.8</caffeine.version>
|
||||
<!-- Office document parsing -->
|
||||
<poi.version>5.2.3</poi.version>
|
||||
<csv.version>1.10.0</csv.version>
|
||||
|
||||
+1
-28
@@ -24,14 +24,11 @@
|
||||
<curator.version>5.5.0</curator.version>
|
||||
<!-- hardware detection -->
|
||||
<oshi.version>6.4.5</oshi.version>
|
||||
<!-- cache -->
|
||||
<caffeine.version>3.1.8</caffeine.version>
|
||||
<!-- Office document parsing -->
|
||||
<poi.version>5.2.3</poi.version>
|
||||
<csv.version>1.10.0</csv.version>
|
||||
<commons-io.version>2.7</commons-io.version>
|
||||
|
||||
<!-- maven core plugin -->
|
||||
<native-maven-plugin.version>0.10.1</native-maven-plugin.version>
|
||||
<maven-clean-plugin.version>3.3.1</maven-clean-plugin.version>
|
||||
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
|
||||
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
|
||||
@@ -54,11 +51,6 @@
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>${commons-io.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zfoo</groupId>
|
||||
<artifactId>scheduler</artifactId>
|
||||
@@ -72,30 +64,11 @@
|
||||
</dependency>
|
||||
|
||||
<!-- excel,world,ppt,xml operation library -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<groupId>commons-io</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<groupId>commons-io</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
|
||||
Reference in New Issue
Block a user