Skip to content

Commit 516235e

Browse files
committed
refactor cache framework
1 parent 30c2f83 commit 516235e

File tree

79 files changed

+516
-326
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+516
-326
lines changed

.flattened-pom.xml

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<groupId>io.github.ipipman</groupId>
66
<artifactId>cache-man</artifactId>
77
<version>0.0.1</version>
8+
<packaging>pom</packaging>
89
<name>cache-man</name>
910
<description>cache-man</description>
1011
<url>https://github.com/ipipman/cache-man</url>
@@ -31,25 +32,4 @@
3132
<system>github</system>
3233
<url>https://github.com/ipipman/cache-man/issues</url>
3334
</issueManagement>
34-
<dependencies>
35-
<dependency>
36-
<groupId>org.springframework.boot</groupId>
37-
<artifactId>spring-boot-starter</artifactId>
38-
<version>3.3.0</version>
39-
<scope>compile</scope>
40-
</dependency>
41-
<dependency>
42-
<groupId>io.netty</groupId>
43-
<artifactId>netty-all</artifactId>
44-
<version>4.1.104.Final</version>
45-
<scope>compile</scope>
46-
</dependency>
47-
<dependency>
48-
<groupId>org.projectlombok</groupId>
49-
<artifactId>lombok</artifactId>
50-
<version>1.18.32</version>
51-
<scope>compile</scope>
52-
<optional>true</optional>
53-
</dependency>
54-
</dependencies>
5535
</project>

cache-core/.flattened-pom.xml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>cn.ipman</groupId>
6+
<artifactId>cache-core</artifactId>
7+
<version>0.0.1-SNAPSHOT</version>
8+
<name>cache-core</name>
9+
<description>cache-core</description>
10+
<url>https://github.com/ipipman/cache-man/cache-core</url>
11+
<licenses>
12+
<license>
13+
<name>The Apache Software License, Version 2.0</name>
14+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
15+
<distribution>repo</distribution>
16+
</license>
17+
</licenses>
18+
<developers>
19+
<developer>
20+
<name>ipman</name>
21+
<email>[email protected]</email>
22+
<url>https://github.com/ipipman</url>
23+
</developer>
24+
</developers>
25+
<scm>
26+
<connection>scm:git:https://github.com/ipipman/cache-man.git/cache-core</connection>
27+
<developerConnection>scm:git:https://github.com/ipipman/cache-man.git/cache-core</developerConnection>
28+
<url>https://github.com/ipipman/cache-man/cache-core</url>
29+
</scm>
30+
<issueManagement>
31+
<system>github</system>
32+
<url>https://github.com/ipipman/cache-man/issues</url>
33+
</issueManagement>
34+
<dependencies>
35+
<dependency>
36+
<groupId>org.projectlombok</groupId>
37+
<artifactId>lombok</artifactId>
38+
<version>1.18.32</version>
39+
<scope>compile</scope>
40+
<optional>true</optional>
41+
</dependency>
42+
</dependencies>
43+
</project>

cache-core/pom.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>io.github.ipipman</groupId>
7+
<artifactId>cache-man</artifactId>
8+
<version>0.0.1</version>
9+
<relativePath>../pom.xml</relativePath>
10+
</parent>
11+
12+
<groupId>cn.ipman</groupId>
13+
<artifactId>cache-core</artifactId>
14+
<version>0.0.1-SNAPSHOT</version>
15+
16+
<name>cache-core</name>
17+
<description>cache-core</description>
18+
19+
<dependencies>
20+
<dependency>
21+
<groupId>org.projectlombok</groupId>
22+
<artifactId>lombok</artifactId>
23+
<optional>true</optional>
24+
</dependency>
25+
</dependencies>
26+
27+
</project>

src/main/java/cn/ipman/cache/command/Command.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/Command.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
package cn.ipman.cache.command;
1+
package cn.ipman.cache.core.command;
22

3-
import cn.ipman.cache.core.IMCache;
4-
import cn.ipman.cache.core.Reply;
3+
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
56

67
public interface Command {
78

src/main/java/cn/ipman/cache/command/Commands.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/Commands.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
package cn.ipman.cache.command;
2-
3-
import cn.ipman.cache.command.common.*;
4-
import cn.ipman.cache.command.hash.*;
5-
import cn.ipman.cache.command.list.*;
6-
import cn.ipman.cache.command.set.*;
7-
import cn.ipman.cache.command.string.*;
8-
import cn.ipman.cache.command.zset.*;
1+
package cn.ipman.cache.core.command;
2+
3+
import cn.ipman.cache.core.command.common.*;
4+
import cn.ipman.cache.core.command.hash.*;
5+
import cn.ipman.cache.core.command.list.*;
6+
import cn.ipman.cache.core.command.set.*;
7+
import cn.ipman.cache.core.command.string.*;
8+
import cn.ipman.cache.core.command.zset.*;
99

1010
import java.util.LinkedHashMap;
1111
import java.util.Map;

src/main/java/cn/ipman/cache/command/common/CmdCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/common/CmdCommand.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
package cn.ipman.cache.command.common;
2-
3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
1+
package cn.ipman.cache.core.command.common;
62

3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
76
/**
87
* Description for this class
98
*

src/main/java/cn/ipman/cache/command/common/DelCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/common/DelCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.common;
1+
package cn.ipman.cache.core.command.common;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/common/ExistsCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/common/ExistsCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.common;
1+
package cn.ipman.cache.core.command.common;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/common/ExpireCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/common/ExpireCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.common;
1+
package cn.ipman.cache.core.command.common;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/common/InfoCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/common/InfoCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.common;
1+
package cn.ipman.cache.core.command.common;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/common/PingCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/common/PingCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.common;
1+
package cn.ipman.cache.core.command.common;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/common/TTLCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/common/TTLCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.common;
1+
package cn.ipman.cache.core.command.common;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/hash/HdelCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/hash/HdelCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.hash;
1+
package cn.ipman.cache.core.command.hash;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/hash/HexistsCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/hash/HexistsCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.hash;
1+
package cn.ipman.cache.core.command.hash;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/hash/HgetCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/hash/HgetCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.hash;
1+
package cn.ipman.cache.core.command.hash;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/hash/HgetallCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/hash/HgetallCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.hash;
1+
package cn.ipman.cache.core.command.hash;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/hash/HlenCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/hash/HlenCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.hash;
1+
package cn.ipman.cache.core.command.hash;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/hash/HmgetCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/hash/HmgetCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.hash;
1+
package cn.ipman.cache.core.command.hash;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/hash/HsetCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/hash/HsetCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.hash;
1+
package cn.ipman.cache.core.command.hash;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/list/LindexCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/list/LindexCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.list;
1+
package cn.ipman.cache.core.command.list;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/list/LlenCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/list/LlenCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.list;
1+
package cn.ipman.cache.core.command.list;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/list/LpopCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/list/LpopCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.list;
1+
package cn.ipman.cache.core.command.list;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/list/LpushCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/list/LpushCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.list;
1+
package cn.ipman.cache.core.command.list;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/list/LrangeCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/list/LrangeCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.list;
1+
package cn.ipman.cache.core.command.list;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

src/main/java/cn/ipman/cache/command/list/RpopCommand.java renamed to cache-core/src/main/java/cn/ipman/cache/core/command/list/RpopCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cn.ipman.cache.command.list;
1+
package cn.ipman.cache.core.command.list;
22

3-
import cn.ipman.cache.command.Command;
4-
import cn.ipman.cache.core.IMCache;
5-
import cn.ipman.cache.core.Reply;
3+
import cn.ipman.cache.core.command.Command;
4+
import cn.ipman.cache.core.core.IMCache;
5+
import cn.ipman.cache.core.core.Reply;
66

77
/**
88
* Description for this class

0 commit comments

Comments
 (0)