Kotlin thread-safe Redisson wrapper powered by integration with Stately
val connectionString = "rediss://root:12345@do-user-randombd.example.com:37081"
val redis = create(clientOf(connectionString))
val map = threadSafeMap<String, Int>("timecoins")
map.access { // isolated state
it["apples"] = 475
}
Download with Gradle
Add the JitPack repository to your build.gradle.kts
:
repositories {
maven("https://jitpack.io")
}
Add the dependency:
dependencies {
implementation("com.github.demidko:redis-utils:2021.06.30")
}