Skip to content

Commit 0372366

Browse files
authored
Merge pull request #21 from SLNE-Development/feat/redis-streams
refactor: Use redis streams for sync structures
2 parents 7dbe20d + f1e493e commit 0372366

34 files changed

+1271
-75577
lines changed

.idea/dictionaries/project.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/externalDependencies.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.luarc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"diagnostics.globals": [
3+
"redis",
4+
"KEYS",
5+
"ARGV"
6+
]
7+
}

build.gradle.kts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import com.github.jengelman.gradle.plugins.shadow.ShadowExtension
22
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
33
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmExtension
4-
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
5-
import org.jetbrains.kotlin.gradle.dsl.abi.AbiValidationExtension
6-
import org.jetbrains.kotlin.gradle.dsl.abi.ExperimentalAbiValidation
74

85
buildscript {
96
repositories {
@@ -45,16 +42,5 @@ subprojects {
4542
optIn.add("dev.slne.surf.redis.util.InternalRedisAPI")
4643
}
4744
}
48-
49-
@OptIn(ExperimentalAbiValidation::class)
50-
configure<KotlinJvmProjectExtension> {
51-
configure<AbiValidationExtension> {
52-
filters {
53-
excluded {
54-
annotatedWith.add("dev.slne.surf.redis.util.InternalRedisAPI")
55-
}
56-
}
57-
}
58-
}
5945
}
6046
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ org.gradle.parallel=true
44
#org.gradle.caching=true
55
#org.gradle.configureondemand=true
66

7-
version=1.21.11-1.1.0-SNAPSHOT
7+
version=1.21.11-1.0.0-SNAPSHOT

gradle/wrapper/gradle-wrapper.jar

2.43 KB
Binary file not shown.

gradlew

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

surf-redis-api/api/surf-redis-api.api

Lines changed: 58 additions & 74414 deletions
Large diffs are not rendered by default.

surf-redis-api/build.gradle.kts

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
1+
@file:OptIn(ExperimentalAbiValidation::class)
2+
13
import dev.slne.surf.surfapi.gradle.util.slneReleases
4+
import org.gradle.kotlin.dsl.abiValidation
25
import org.jetbrains.kotlin.gradle.dsl.abi.ExperimentalAbiValidation
36

47
plugins {
58
id("dev.slne.surf.surfapi.gradle.core")
69
// id("dev.slne.surf.surfapi.gradle.standalone") /* Uncomment to use tests */
710
}
811

12+
surfCoreApi {
13+
withApiValidation()
14+
}
15+
16+
kotlin {
17+
abiValidation {
18+
filters {
19+
excluded {
20+
annotatedWith.add("dev.slne.surf.redis.util.InternalRedisAPI")
21+
}
22+
}
23+
}
24+
}
25+
926
dependencies {
1027
api("org.redisson:redisson:4.1.0") {
1128
exclude("org.slf4j")
@@ -35,18 +52,35 @@ publishing {
3552
}
3653
}
3754

38-
kotlin {
39-
@OptIn(ExperimentalAbiValidation::class)
40-
abiValidation {
41-
enabled.set(true)
42-
}
43-
}
44-
4555
tasks.test {
4656
useJUnitPlatform()
4757
}
4858

59+
tasks {
60+
dumpLegacyAbi {
61+
}
62+
63+
updateLegacyAbi {
64+
65+
}
66+
}
67+
68+
//tasks {
69+
// apiBuild {
70+
// inputJar.value(shadowJar.flatMap { it.archiveFile })
71+
// }
72+
//}
73+
4974
java {
5075
withSourcesJar()
5176
withJavadocJar()
52-
}
77+
}
78+
79+
//afterEvaluate {
80+
// tasks.named("publishPluginMavenPublicationToMaven-releasesRepository") {
81+
// enabled = false
82+
// }
83+
// tasks.named("publishPluginMavenPublicationToMavenLocal") {
84+
// enabled = false
85+
// }
86+
//}

surf-redis-api/src/main/kotlin/dev/slne/surf/redis/RedisApi.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ class RedisApi private constructor(
134134
val config = Config()
135135
.setPassword(redisURI.password)
136136
.setTransportMode(transportMode)
137+
.setTcpKeepAlive(true)
138+
.setTcpKeepAliveInterval(5.seconds.inWholeMilliseconds.toInt())
137139
.setEventLoopGroup(RedisComponentProvider.get().eventLoopGroup)
138140
.setExecutor(RedisComponentProvider.get().redissonExecutorService)
139141
.apply {

0 commit comments

Comments
 (0)