From e3bad500eb14920eee1cdb8f62f042251ab9827d Mon Sep 17 00:00:00 2001 From: himadieievsv Date: Sun, 7 Jan 2024 07:53:17 +0900 Subject: [PATCH] use real domain --- README.md | 2 +- build.gradle.kts | 2 +- .../core/locks/ListeningCountDownLatch.kt | 14 +++++++------- .../himadieiev/redpulsar/core/locks/RedLock.kt | 6 +++--- .../redpulsar/core/locks/Semaphore.kt | 6 +++--- .../redpulsar/core/locks/SimpleLock.kt | 6 +++--- .../core/locks/abstracts/AbstractLock.kt | 6 +++--- .../abstracts/AbstractMultyInstanceLock.kt | 4 ++-- .../redpulsar/core/locks/abstracts/Backend.kt | 4 ++-- .../backends/CountDownLatchBackend.kt | 4 ++-- .../locks/abstracts/backends/LocksBackend.kt | 4 ++-- .../redpulsar/core/locks/api/CountDownLatch.kt | 2 +- .../redpulsar/core/locks/api/Lock.kt | 2 +- .../core/locks/excecutors/ExecutorAdditions.kt | 2 +- .../locks/excecutors/MultyInstanceExecutor.kt | 8 ++++---- .../redpulsar/core/utils/Failsafe.kt | 2 +- .../redpulsar/core/utils/WithRetry.kt | 2 +- .../core/utils/WithTimeoutInThread.kt | 2 +- .../core/locks/ListeningCountDownLatchTest.kt | 6 +++--- .../redpulsar/core/locks/RedLockTest.kt | 4 ++-- .../redpulsar/core/locks/SemaphoreTest.kt | 4 ++-- .../redpulsar/core/locks/SimpleLockTest.kt | 4 ++-- .../excecutors/MultyInstanceExecutorTest.kt | 4 ++-- .../redpulsar/core/utils/FailsafeTest.kt | 2 +- .../redpulsar/core/utils/WithRetryTest.kt | 2 +- .../core/utils/WithTimeoutInThreadTest.kt | 2 +- redpulsar-jedis/README.md | 4 ++-- .../redpulsar/jedis/locks/LockFactory.kt | 14 +++++++------- .../backends/JedisCountDownLatchBackend.kt | 6 +++--- .../jedis/locks/backends/JedisLocksBackend.kt | 6 +++--- .../CountDownLatchIntegrationTest.kt | 12 ++++++------ .../integrationtests/RedLockIntegrationTest.kt | 8 ++++---- .../SemaphoreIntegrationTest.kt | 8 ++++---- .../SimpleLockIntegrationTest.kt | 8 ++++---- .../redpulsar/jedis/locks/LockFactoryTest.kt | 2 +- .../backends/JedisCountDownLatchBackendTest.kt | 2 +- .../locks/backends/JedisLocksBackendTest.kt | 2 +- redpulsar-lettuce/README.md | 4 ++-- .../redpulsar/lettuce/LettucePooled.kt | 4 ++-- .../redpulsar/lettuce/LettucePubSubPooled.kt | 4 ++-- .../lettuce/abstracts/AbstractLettucePooled.kt | 4 ++-- .../exceptions/LettucePooledException.kt | 2 +- .../redpulsar/lettuce/locks/LockFactory.kt | 18 +++++++++--------- .../backends/LettuceCountDownLatchBackend.kt | 8 ++++---- .../locks/backends/LettuceLocksBackend.kt | 8 ++++---- .../src/test/kotlin/TestCommons.kt | 4 ++-- .../redpulsar/lettuce/LettucePooledTest.kt | 4 ++-- .../lettuce/LettucePubSubPooledTest.kt | 4 ++-- .../CountDownLatchIntegrationTest.kt | 14 +++++++------- .../integrationtests/RedLockIntegrationTest.kt | 10 +++++----- .../SemaphoreIntegrationTest.kt | 10 +++++----- .../SimpleLockIntegrationTest.kt | 10 +++++----- .../redpulsar/lettuce/locks/LockFactoryTest.kt | 2 +- .../LettuceCountDownLatchBackendTest.kt | 4 ++-- .../locks/backends/LettuceLocksBackendTest.kt | 4 ++-- 55 files changed, 148 insertions(+), 148 deletions(-) rename redpulsar-core/src/main/kotlin/{me => com}/himadieiev/redpulsar/core/locks/ListeningCountDownLatch.kt (94%) rename redpulsar-core/src/main/kotlin/{me => com}/himadieiev/redpulsar/core/locks/RedLock.kt (85%) rename redpulsar-core/src/main/kotlin/{me => com}/himadieiev/redpulsar/core/locks/Semaphore.kt (93%) rename redpulsar-core/src/main/kotlin/{me => com}/himadieiev/redpulsar/core/locks/SimpleLock.kt (87%) rename redpulsar-core/src/main/kotlin/{me => com}/himadieiev/redpulsar/core/locks/abstracts/AbstractLock.kt (81%) rename redpulsar-core/src/main/kotlin/{me => com}/himadieiev/redpulsar/core/locks/abstracts/AbstractMultyInstanceLock.kt (95%) rename redpulsar-core/src/main/kotlin/{me => com}/himadieiev/redpulsar/core/locks/abstracts/Backend.kt (84%) rename redpulsar-core/src/main/kotlin/{me => com}/himadieiev/redpulsar/core/locks/abstracts/backends/CountDownLatchBackend.kt (89%) rename redpulsar-core/src/main/kotlin/{me => com}/himadieiev/redpulsar/core/locks/abstracts/backends/LocksBackend.kt (86%) rename redpulsar-core/src/main/kotlin/{me => com}/himadieiev/redpulsar/core/locks/api/CountDownLatch.kt (97%) rename redpulsar-core/src/main/kotlin/{me => com}/himadieiev/redpulsar/core/locks/api/Lock.kt (94%) rename redpulsar-core/src/main/kotlin/{me => com}/himadieiev/redpulsar/core/locks/excecutors/ExecutorAdditions.kt (91%) rename redpulsar-core/src/main/kotlin/{me => com}/himadieiev/redpulsar/core/locks/excecutors/MultyInstanceExecutor.kt (93%) rename redpulsar-core/src/main/kotlin/{me => com}/himadieiev/redpulsar/core/utils/Failsafe.kt (90%) rename redpulsar-core/src/main/kotlin/{me => com}/himadieiev/redpulsar/core/utils/WithRetry.kt (94%) rename redpulsar-core/src/main/kotlin/{me => com}/himadieiev/redpulsar/core/utils/WithTimeoutInThread.kt (95%) rename redpulsar-core/src/test/kotlin/{me => com}/himadieiev/redpulsar/core/locks/ListeningCountDownLatchTest.kt (99%) rename redpulsar-core/src/test/kotlin/{me => com}/himadieiev/redpulsar/core/locks/RedLockTest.kt (98%) rename redpulsar-core/src/test/kotlin/{me => com}/himadieiev/redpulsar/core/locks/SemaphoreTest.kt (99%) rename redpulsar-core/src/test/kotlin/{me => com}/himadieiev/redpulsar/core/locks/SimpleLockTest.kt (96%) rename redpulsar-core/src/test/kotlin/{me => com}/himadieiev/redpulsar/core/locks/excecutors/MultyInstanceExecutorTest.kt (98%) rename redpulsar-core/src/test/kotlin/{me => com}/himadieiev/redpulsar/core/utils/FailsafeTest.kt (94%) rename redpulsar-core/src/test/kotlin/{me => com}/himadieiev/redpulsar/core/utils/WithRetryTest.kt (97%) rename redpulsar-core/src/test/kotlin/{me => com}/himadieiev/redpulsar/core/utils/WithTimeoutInThreadTest.kt (96%) rename redpulsar-jedis/src/main/kotlin/{me => com}/himadieiev/redpulsar/jedis/locks/LockFactory.kt (89%) rename redpulsar-jedis/src/main/kotlin/{me => com}/himadieiev/redpulsar/jedis/locks/backends/JedisCountDownLatchBackend.kt (94%) rename redpulsar-jedis/src/main/kotlin/{me => com}/himadieiev/redpulsar/jedis/locks/backends/JedisLocksBackend.kt (94%) rename redpulsar-jedis/src/test/kotlin/{me => com}/himadieiev/redpulsar/jedis/integrationtests/CountDownLatchIntegrationTest.kt (91%) rename redpulsar-jedis/src/test/kotlin/{me => com}/himadieiev/redpulsar/jedis/integrationtests/RedLockIntegrationTest.kt (90%) rename redpulsar-jedis/src/test/kotlin/{me => com}/himadieiev/redpulsar/jedis/integrationtests/SemaphoreIntegrationTest.kt (95%) rename redpulsar-jedis/src/test/kotlin/{me => com}/himadieiev/redpulsar/jedis/integrationtests/SimpleLockIntegrationTest.kt (90%) rename redpulsar-jedis/src/test/kotlin/{me => com}/himadieiev/redpulsar/jedis/locks/LockFactoryTest.kt (98%) rename redpulsar-jedis/src/test/kotlin/{me => com}/himadieiev/redpulsar/jedis/locks/backends/JedisCountDownLatchBackendTest.kt (99%) rename redpulsar-jedis/src/test/kotlin/{me => com}/himadieiev/redpulsar/jedis/locks/backends/JedisLocksBackendTest.kt (99%) rename redpulsar-lettuce/src/main/kotlin/{me => com}/himadieiev/redpulsar/lettuce/LettucePooled.kt (95%) rename redpulsar-lettuce/src/main/kotlin/{me => com}/himadieiev/redpulsar/lettuce/LettucePubSubPooled.kt (96%) rename redpulsar-lettuce/src/main/kotlin/{me => com}/himadieiev/redpulsar/lettuce/abstracts/AbstractLettucePooled.kt (93%) rename redpulsar-lettuce/src/main/kotlin/{me => com}/himadieiev/redpulsar/lettuce/exceptions/LettucePooledException.kt (63%) rename redpulsar-lettuce/src/main/kotlin/{me => com}/himadieiev/redpulsar/lettuce/locks/LockFactory.kt (87%) rename redpulsar-lettuce/src/main/kotlin/{me => com}/himadieiev/redpulsar/lettuce/locks/backends/LettuceCountDownLatchBackend.kt (94%) rename redpulsar-lettuce/src/main/kotlin/{me => com}/himadieiev/redpulsar/lettuce/locks/backends/LettuceLocksBackend.kt (93%) rename redpulsar-lettuce/src/test/kotlin/{me => com}/himadieiev/redpulsar/lettuce/LettucePooledTest.kt (96%) rename redpulsar-lettuce/src/test/kotlin/{me => com}/himadieiev/redpulsar/lettuce/LettucePubSubPooledTest.kt (96%) rename redpulsar-lettuce/src/test/kotlin/{me => com}/himadieiev/redpulsar/lettuce/integrationtests/CountDownLatchIntegrationTest.kt (90%) rename redpulsar-lettuce/src/test/kotlin/{me => com}/himadieiev/redpulsar/lettuce/integrationtests/RedLockIntegrationTest.kt (89%) rename redpulsar-lettuce/src/test/kotlin/{me => com}/himadieiev/redpulsar/lettuce/integrationtests/SemaphoreIntegrationTest.kt (94%) rename redpulsar-lettuce/src/test/kotlin/{me => com}/himadieiev/redpulsar/lettuce/integrationtests/SimpleLockIntegrationTest.kt (88%) rename redpulsar-lettuce/src/test/kotlin/{me => com}/himadieiev/redpulsar/lettuce/locks/LockFactoryTest.kt (98%) rename redpulsar-lettuce/src/test/kotlin/{me => com}/himadieiev/redpulsar/lettuce/locks/backends/LettuceCountDownLatchBackendTest.kt (98%) rename redpulsar-lettuce/src/test/kotlin/{me => com}/himadieiev/redpulsar/lettuce/locks/backends/LettuceLocksBackendTest.kt (98%) diff --git a/README.md b/README.md index 4a11a59..758a24b 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ docker-compose up -d ### Extending RedPulsar to use other data stores Currently, all features are implemented with Redis. However, it is possible to extend RedPulsar to use other distributed data stores like AWS DynamoDB / Casandra / ScyllaDB etc. Even it could be implemented with RDBMS like MySQL or PostgreSQL. -RedPulsar project have an abstraction level for data storage called [Backend](./redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/Backend.kt). See package [me.himadieiev.redpulsar.core.locks.abstracts.backends](./redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/backends) for details what particular operation should be implemented. +RedPulsar project have an abstraction level for data storage called [Backend](./redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/Backend.kt). See package [com.himadieiev.redpulsar.core.locks.abstracts.backends](./redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/backends) for details what particular operation should be implemented. New data storage should use a new module and implement same abstractions as current Redis implementations. ### Contributing diff --git a/build.gradle.kts b/build.gradle.kts index b0ea047..5f4e6d1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,7 +14,7 @@ plugins { } allprojects { - group = "me.himadieiev" + group = "com.himadieiev" version = "0.9.1" repositories { diff --git a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/ListeningCountDownLatch.kt b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/ListeningCountDownLatch.kt similarity index 94% rename from redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/ListeningCountDownLatch.kt rename to redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/ListeningCountDownLatch.kt index ec008ec..823d074 100644 --- a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/ListeningCountDownLatch.kt +++ b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/ListeningCountDownLatch.kt @@ -1,5 +1,11 @@ -package me.himadieiev.redpulsar.core.locks +package com.himadieiev.redpulsar.core.locks +import com.himadieiev.redpulsar.core.locks.abstracts.backends.CountDownLatchBackend +import com.himadieiev.redpulsar.core.locks.api.CallResult +import com.himadieiev.redpulsar.core.locks.api.CountDownLatch +import com.himadieiev.redpulsar.core.locks.excecutors.executeWithRetry +import com.himadieiev.redpulsar.core.locks.excecutors.waitAnyJobs +import com.himadieiev.redpulsar.core.utils.failsafe import kotlinx.coroutines.CoroutineName import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers @@ -7,12 +13,6 @@ import kotlinx.coroutines.async import kotlinx.coroutines.flow.first import kotlinx.coroutines.runBlocking import kotlinx.coroutines.withTimeout -import me.himadieiev.redpulsar.core.locks.abstracts.backends.CountDownLatchBackend -import me.himadieiev.redpulsar.core.locks.api.CallResult -import me.himadieiev.redpulsar.core.locks.api.CountDownLatch -import me.himadieiev.redpulsar.core.locks.excecutors.executeWithRetry -import me.himadieiev.redpulsar.core.locks.excecutors.waitAnyJobs -import me.himadieiev.redpulsar.core.utils.failsafe import java.time.Duration import java.util.UUID import java.util.concurrent.atomic.AtomicInteger diff --git a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/RedLock.kt b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/RedLock.kt similarity index 85% rename from redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/RedLock.kt rename to redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/RedLock.kt index 1b45ef4..9b3de2d 100644 --- a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/RedLock.kt +++ b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/RedLock.kt @@ -1,9 +1,9 @@ -package me.himadieiev.redpulsar.core.locks +package com.himadieiev.redpulsar.core.locks +import com.himadieiev.redpulsar.core.locks.abstracts.AbstractMultyInstanceLock +import com.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers -import me.himadieiev.redpulsar.core.locks.abstracts.AbstractMultyInstanceLock -import me.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend import java.time.Duration /** diff --git a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/Semaphore.kt b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/Semaphore.kt similarity index 93% rename from redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/Semaphore.kt rename to redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/Semaphore.kt index c13ede5..06907fc 100644 --- a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/Semaphore.kt +++ b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/Semaphore.kt @@ -1,9 +1,9 @@ -package me.himadieiev.redpulsar.core.locks +package com.himadieiev.redpulsar.core.locks +import com.himadieiev.redpulsar.core.locks.abstracts.AbstractMultyInstanceLock +import com.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers -import me.himadieiev.redpulsar.core.locks.abstracts.AbstractMultyInstanceLock -import me.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend import java.time.Duration /** diff --git a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/SimpleLock.kt b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/SimpleLock.kt similarity index 87% rename from redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/SimpleLock.kt rename to redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/SimpleLock.kt index 6d6a67a..eab3ac5 100644 --- a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/SimpleLock.kt +++ b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/SimpleLock.kt @@ -1,9 +1,9 @@ -package me.himadieiev.redpulsar.core.locks +package com.himadieiev.redpulsar.core.locks +import com.himadieiev.redpulsar.core.locks.abstracts.AbstractLock +import com.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking -import me.himadieiev.redpulsar.core.locks.abstracts.AbstractLock -import me.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend import java.time.Duration /** diff --git a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/AbstractLock.kt b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/abstracts/AbstractLock.kt similarity index 81% rename from redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/AbstractLock.kt rename to redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/abstracts/AbstractLock.kt index a5bbe95..17c538a 100644 --- a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/AbstractLock.kt +++ b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/abstracts/AbstractLock.kt @@ -1,7 +1,7 @@ -package me.himadieiev.redpulsar.core.locks.abstracts +package com.himadieiev.redpulsar.core.locks.abstracts -import me.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend -import me.himadieiev.redpulsar.core.locks.api.Lock +import com.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend +import com.himadieiev.redpulsar.core.locks.api.Lock import mu.KotlinLogging import java.time.Duration import java.util.UUID diff --git a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/AbstractMultyInstanceLock.kt b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/abstracts/AbstractMultyInstanceLock.kt similarity index 95% rename from redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/AbstractMultyInstanceLock.kt rename to redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/abstracts/AbstractMultyInstanceLock.kt index be8b1be..91a8f14 100644 --- a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/AbstractMultyInstanceLock.kt +++ b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/abstracts/AbstractMultyInstanceLock.kt @@ -1,12 +1,12 @@ -package me.himadieiev.redpulsar.core.locks.abstracts +package com.himadieiev.redpulsar.core.locks.abstracts +import com.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Job import kotlinx.coroutines.delay import kotlinx.coroutines.joinAll import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking -import me.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend import java.time.Duration import java.util.concurrent.atomic.AtomicInteger import kotlin.coroutines.cancellation.CancellationException diff --git a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/Backend.kt b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/abstracts/Backend.kt similarity index 84% rename from redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/Backend.kt rename to redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/abstracts/Backend.kt index 66a9152..551a94b 100644 --- a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/Backend.kt +++ b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/abstracts/Backend.kt @@ -1,7 +1,7 @@ -package me.himadieiev.redpulsar.core.locks.abstracts +package com.himadieiev.redpulsar.core.locks.abstracts +import com.himadieiev.redpulsar.core.utils.failsafe import kotlinx.coroutines.flow.Flow -import me.himadieiev.redpulsar.core.utils.failsafe import java.util.NoSuchElementException /** diff --git a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/backends/CountDownLatchBackend.kt b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/abstracts/backends/CountDownLatchBackend.kt similarity index 89% rename from redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/backends/CountDownLatchBackend.kt rename to redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/abstracts/backends/CountDownLatchBackend.kt index d622730..ba5646a 100644 --- a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/backends/CountDownLatchBackend.kt +++ b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/abstracts/backends/CountDownLatchBackend.kt @@ -1,7 +1,7 @@ -package me.himadieiev.redpulsar.core.locks.abstracts.backends +package com.himadieiev.redpulsar.core.locks.abstracts.backends +import com.himadieiev.redpulsar.core.locks.abstracts.Backend import kotlinx.coroutines.flow.Flow -import me.himadieiev.redpulsar.core.locks.abstracts.Backend import java.time.Duration /** diff --git a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/backends/LocksBackend.kt b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/abstracts/backends/LocksBackend.kt similarity index 86% rename from redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/backends/LocksBackend.kt rename to redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/abstracts/backends/LocksBackend.kt index 34256a0..5394bd4 100644 --- a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/abstracts/backends/LocksBackend.kt +++ b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/abstracts/backends/LocksBackend.kt @@ -1,6 +1,6 @@ -package me.himadieiev.redpulsar.core.locks.abstracts.backends +package com.himadieiev.redpulsar.core.locks.abstracts.backends -import me.himadieiev.redpulsar.core.locks.abstracts.Backend +import com.himadieiev.redpulsar.core.locks.abstracts.Backend import java.time.Duration /** diff --git a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/api/CountDownLatch.kt b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/api/CountDownLatch.kt similarity index 97% rename from redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/api/CountDownLatch.kt rename to redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/api/CountDownLatch.kt index 91e71e2..ffc37b9 100644 --- a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/api/CountDownLatch.kt +++ b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/api/CountDownLatch.kt @@ -1,4 +1,4 @@ -package me.himadieiev.redpulsar.core.locks.api +package com.himadieiev.redpulsar.core.locks.api import java.time.Duration diff --git a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/api/Lock.kt b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/api/Lock.kt similarity index 94% rename from redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/api/Lock.kt rename to redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/api/Lock.kt index 56e3129..8908ad6 100644 --- a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/api/Lock.kt +++ b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/api/Lock.kt @@ -1,4 +1,4 @@ -package me.himadieiev.redpulsar.core.locks.api +package com.himadieiev.redpulsar.core.locks.api import java.time.Duration diff --git a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/excecutors/ExecutorAdditions.kt b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/excecutors/ExecutorAdditions.kt similarity index 91% rename from redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/excecutors/ExecutorAdditions.kt rename to redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/excecutors/ExecutorAdditions.kt index 32843ef..dfeb9f3 100644 --- a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/excecutors/ExecutorAdditions.kt +++ b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/excecutors/ExecutorAdditions.kt @@ -1,4 +1,4 @@ -package me.himadieiev.redpulsar.core.locks.excecutors +package com.himadieiev.redpulsar.core.locks.excecutors import kotlinx.coroutines.Job import kotlinx.coroutines.joinAll diff --git a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/excecutors/MultyInstanceExecutor.kt b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/excecutors/MultyInstanceExecutor.kt similarity index 93% rename from redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/excecutors/MultyInstanceExecutor.kt rename to redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/excecutors/MultyInstanceExecutor.kt index 92c835d..f62a7ed 100644 --- a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/locks/excecutors/MultyInstanceExecutor.kt +++ b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/locks/excecutors/MultyInstanceExecutor.kt @@ -1,12 +1,12 @@ -package me.himadieiev.redpulsar.core.locks.excecutors +package com.himadieiev.redpulsar.core.locks.excecutors +import com.himadieiev.redpulsar.core.locks.abstracts.Backend +import com.himadieiev.redpulsar.core.utils.withRetry +import com.himadieiev.redpulsar.core.utils.withTimeoutInThread import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Job import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking -import me.himadieiev.redpulsar.core.locks.abstracts.Backend -import me.himadieiev.redpulsar.core.utils.withRetry -import me.himadieiev.redpulsar.core.utils.withTimeoutInThread import java.time.Duration import java.util.Collections import kotlin.system.measureTimeMillis diff --git a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/utils/Failsafe.kt b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/utils/Failsafe.kt similarity index 90% rename from redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/utils/Failsafe.kt rename to redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/utils/Failsafe.kt index cde0d05..565cf1b 100644 --- a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/utils/Failsafe.kt +++ b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/utils/Failsafe.kt @@ -1,4 +1,4 @@ -package me.himadieiev.redpulsar.core.utils +package com.himadieiev.redpulsar.core.utils import mu.KotlinLogging diff --git a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/utils/WithRetry.kt b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/utils/WithRetry.kt similarity index 94% rename from redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/utils/WithRetry.kt rename to redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/utils/WithRetry.kt index 23b5c36..61616c6 100644 --- a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/utils/WithRetry.kt +++ b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/utils/WithRetry.kt @@ -1,4 +1,4 @@ -package me.himadieiev.redpulsar.core.utils +package com.himadieiev.redpulsar.core.utils import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking diff --git a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/utils/WithTimeoutInThread.kt b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/utils/WithTimeoutInThread.kt similarity index 95% rename from redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/utils/WithTimeoutInThread.kt rename to redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/utils/WithTimeoutInThread.kt index b151746..6519591 100644 --- a/redpulsar-core/src/main/kotlin/me/himadieiev/redpulsar/core/utils/WithTimeoutInThread.kt +++ b/redpulsar-core/src/main/kotlin/com/himadieiev/redpulsar/core/utils/WithTimeoutInThread.kt @@ -1,4 +1,4 @@ -package me.himadieiev.redpulsar.core.utils +package com.himadieiev.redpulsar.core.utils import mu.KotlinLogging diff --git a/redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/locks/ListeningCountDownLatchTest.kt b/redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/locks/ListeningCountDownLatchTest.kt similarity index 99% rename from redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/locks/ListeningCountDownLatchTest.kt rename to redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/locks/ListeningCountDownLatchTest.kt index f79e200..8a21129 100644 --- a/redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/locks/ListeningCountDownLatchTest.kt +++ b/redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/locks/ListeningCountDownLatchTest.kt @@ -1,6 +1,8 @@ -package me.himadieiev.redpulsar.core.locks +package com.himadieiev.redpulsar.core.locks import TestTags +import com.himadieiev.redpulsar.core.locks.abstracts.backends.CountDownLatchBackend +import com.himadieiev.redpulsar.core.locks.api.CallResult import io.mockk.coEvery import io.mockk.every import io.mockk.mockk @@ -10,8 +12,6 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.delay import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flow -import me.himadieiev.redpulsar.core.locks.abstracts.backends.CountDownLatchBackend -import me.himadieiev.redpulsar.core.locks.api.CallResult import org.junit.jupiter.api.Assertions.assertDoesNotThrow import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.BeforeEach diff --git a/redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/locks/RedLockTest.kt b/redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/locks/RedLockTest.kt similarity index 98% rename from redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/locks/RedLockTest.kt rename to redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/locks/RedLockTest.kt index fe4bd62..d11cd72 100644 --- a/redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/locks/RedLockTest.kt +++ b/redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/locks/RedLockTest.kt @@ -1,12 +1,12 @@ -package me.himadieiev.redpulsar.core.locks +package com.himadieiev.redpulsar.core.locks import TestTags +import com.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend import io.mockk.every import io.mockk.mockk import io.mockk.verify import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking -import me.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Assertions.assertFalse import org.junit.jupiter.api.Assertions.assertTrue diff --git a/redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/locks/SemaphoreTest.kt b/redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/locks/SemaphoreTest.kt similarity index 99% rename from redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/locks/SemaphoreTest.kt rename to redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/locks/SemaphoreTest.kt index 10c397e..89c91d1 100644 --- a/redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/locks/SemaphoreTest.kt +++ b/redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/locks/SemaphoreTest.kt @@ -1,9 +1,9 @@ -package me.himadieiev.redpulsar.core.locks +package com.himadieiev.redpulsar.core.locks +import com.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend import io.mockk.every import io.mockk.mockk import io.mockk.verify -import me.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Assertions.assertFalse import org.junit.jupiter.api.Assertions.assertTrue diff --git a/redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/locks/SimpleLockTest.kt b/redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/locks/SimpleLockTest.kt similarity index 96% rename from redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/locks/SimpleLockTest.kt rename to redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/locks/SimpleLockTest.kt index e0ad8e1..18737d9 100644 --- a/redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/locks/SimpleLockTest.kt +++ b/redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/locks/SimpleLockTest.kt @@ -1,10 +1,10 @@ -package me.himadieiev.redpulsar.core.locks +package com.himadieiev.redpulsar.core.locks import TestTags +import com.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend import io.mockk.every import io.mockk.mockk import io.mockk.verify -import me.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend import org.junit.jupiter.api.Assertions.assertDoesNotThrow import org.junit.jupiter.api.Assertions.assertFalse import org.junit.jupiter.api.Assertions.assertTrue diff --git a/redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/locks/excecutors/MultyInstanceExecutorTest.kt b/redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/locks/excecutors/MultyInstanceExecutorTest.kt similarity index 98% rename from redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/locks/excecutors/MultyInstanceExecutorTest.kt rename to redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/locks/excecutors/MultyInstanceExecutorTest.kt index d0416b5..33727e2 100644 --- a/redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/locks/excecutors/MultyInstanceExecutorTest.kt +++ b/redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/locks/excecutors/MultyInstanceExecutorTest.kt @@ -1,12 +1,12 @@ -package me.himadieiev.redpulsar.core.locks.excecutors +package com.himadieiev.redpulsar.core.locks.excecutors import TestTags +import com.himadieiev.redpulsar.core.locks.abstracts.Backend import io.mockk.every import io.mockk.mockk import io.mockk.verify import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers -import me.himadieiev.redpulsar.core.locks.abstracts.Backend import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Tag diff --git a/redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/utils/FailsafeTest.kt b/redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/utils/FailsafeTest.kt similarity index 94% rename from redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/utils/FailsafeTest.kt rename to redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/utils/FailsafeTest.kt index d52a9cb..b81cd17 100644 --- a/redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/utils/FailsafeTest.kt +++ b/redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/utils/FailsafeTest.kt @@ -1,4 +1,4 @@ -package me.himadieiev.redpulsar.core.utils +package com.himadieiev.redpulsar.core.utils import io.mockk.mockk import org.junit.jupiter.api.Assertions.assertEquals diff --git a/redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/utils/WithRetryTest.kt b/redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/utils/WithRetryTest.kt similarity index 97% rename from redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/utils/WithRetryTest.kt rename to redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/utils/WithRetryTest.kt index 991e619..6492ab0 100644 --- a/redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/utils/WithRetryTest.kt +++ b/redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/utils/WithRetryTest.kt @@ -1,4 +1,4 @@ -package me.himadieiev.redpulsar.core.utils +package com.himadieiev.redpulsar.core.utils import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertTrue diff --git a/redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/utils/WithTimeoutInThreadTest.kt b/redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/utils/WithTimeoutInThreadTest.kt similarity index 96% rename from redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/utils/WithTimeoutInThreadTest.kt rename to redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/utils/WithTimeoutInThreadTest.kt index 5a80c22..83352b9 100644 --- a/redpulsar-core/src/test/kotlin/me/himadieiev/redpulsar/core/utils/WithTimeoutInThreadTest.kt +++ b/redpulsar-core/src/test/kotlin/com/himadieiev/redpulsar/core/utils/WithTimeoutInThreadTest.kt @@ -1,4 +1,4 @@ -package me.himadieiev.redpulsar.core.utils +package com.himadieiev.redpulsar.core.utils import mu.KotlinLogging import org.junit.jupiter.api.Assertions.assertEquals diff --git a/redpulsar-jedis/README.md b/redpulsar-jedis/README.md index 6c7080c..4cade61 100644 --- a/redpulsar-jedis/README.md +++ b/redpulsar-jedis/README.md @@ -4,8 +4,8 @@ Gradle dependency: ```kotlin -implementation("me.himadieiev:redpulsar-core:0.1.1") -implementation("me.himadieiev:redpulsar-jedis:0.1.1") +implementation("com.himadieiev:redpulsar-core:0.1.1") +implementation("com.himadieiev:redpulsar-jedis:0.1.1") implementation("redis.clients:jedis:5.1.0") ``` diff --git a/redpulsar-jedis/src/main/kotlin/me/himadieiev/redpulsar/jedis/locks/LockFactory.kt b/redpulsar-jedis/src/main/kotlin/com/himadieiev/redpulsar/jedis/locks/LockFactory.kt similarity index 89% rename from redpulsar-jedis/src/main/kotlin/me/himadieiev/redpulsar/jedis/locks/LockFactory.kt rename to redpulsar-jedis/src/main/kotlin/com/himadieiev/redpulsar/jedis/locks/LockFactory.kt index 690043a..75e4037 100644 --- a/redpulsar-jedis/src/main/kotlin/me/himadieiev/redpulsar/jedis/locks/LockFactory.kt +++ b/redpulsar-jedis/src/main/kotlin/com/himadieiev/redpulsar/jedis/locks/LockFactory.kt @@ -1,13 +1,13 @@ -package me.himadieiev.redpulsar.jedis.locks +package com.himadieiev.redpulsar.jedis.locks +import com.himadieiev.redpulsar.core.locks.ListeningCountDownLatch +import com.himadieiev.redpulsar.core.locks.RedLock +import com.himadieiev.redpulsar.core.locks.Semaphore +import com.himadieiev.redpulsar.core.locks.SimpleLock +import com.himadieiev.redpulsar.jedis.locks.backends.JedisCountDownLatchBackend +import com.himadieiev.redpulsar.jedis.locks.backends.JedisLocksBackend import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers -import me.himadieiev.redpulsar.core.locks.ListeningCountDownLatch -import me.himadieiev.redpulsar.core.locks.RedLock -import me.himadieiev.redpulsar.core.locks.Semaphore -import me.himadieiev.redpulsar.core.locks.SimpleLock -import me.himadieiev.redpulsar.jedis.locks.backends.JedisCountDownLatchBackend -import me.himadieiev.redpulsar.jedis.locks.backends.JedisLocksBackend import redis.clients.jedis.UnifiedJedis import java.time.Duration diff --git a/redpulsar-jedis/src/main/kotlin/me/himadieiev/redpulsar/jedis/locks/backends/JedisCountDownLatchBackend.kt b/redpulsar-jedis/src/main/kotlin/com/himadieiev/redpulsar/jedis/locks/backends/JedisCountDownLatchBackend.kt similarity index 94% rename from redpulsar-jedis/src/main/kotlin/me/himadieiev/redpulsar/jedis/locks/backends/JedisCountDownLatchBackend.kt rename to redpulsar-jedis/src/main/kotlin/com/himadieiev/redpulsar/jedis/locks/backends/JedisCountDownLatchBackend.kt index 9908ae7..3e894eb 100644 --- a/redpulsar-jedis/src/main/kotlin/me/himadieiev/redpulsar/jedis/locks/backends/JedisCountDownLatchBackend.kt +++ b/redpulsar-jedis/src/main/kotlin/com/himadieiev/redpulsar/jedis/locks/backends/JedisCountDownLatchBackend.kt @@ -1,11 +1,11 @@ -package me.himadieiev.redpulsar.jedis.locks.backends +package com.himadieiev.redpulsar.jedis.locks.backends +import com.himadieiev.redpulsar.core.locks.abstracts.backends.CountDownLatchBackend +import com.himadieiev.redpulsar.core.utils.failsafe import kotlinx.coroutines.channels.awaitClose import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.callbackFlow import kotlinx.coroutines.launch -import me.himadieiev.redpulsar.core.locks.abstracts.backends.CountDownLatchBackend -import me.himadieiev.redpulsar.core.utils.failsafe import mu.KotlinLogging import redis.clients.jedis.JedisPubSub import redis.clients.jedis.UnifiedJedis diff --git a/redpulsar-jedis/src/main/kotlin/me/himadieiev/redpulsar/jedis/locks/backends/JedisLocksBackend.kt b/redpulsar-jedis/src/main/kotlin/com/himadieiev/redpulsar/jedis/locks/backends/JedisLocksBackend.kt similarity index 94% rename from redpulsar-jedis/src/main/kotlin/me/himadieiev/redpulsar/jedis/locks/backends/JedisLocksBackend.kt rename to redpulsar-jedis/src/main/kotlin/com/himadieiev/redpulsar/jedis/locks/backends/JedisLocksBackend.kt index 36595b3..e2dcdd9 100644 --- a/redpulsar-jedis/src/main/kotlin/me/himadieiev/redpulsar/jedis/locks/backends/JedisLocksBackend.kt +++ b/redpulsar-jedis/src/main/kotlin/com/himadieiev/redpulsar/jedis/locks/backends/JedisLocksBackend.kt @@ -1,7 +1,7 @@ -package me.himadieiev.redpulsar.jedis.locks.backends +package com.himadieiev.redpulsar.jedis.locks.backends -import me.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend -import me.himadieiev.redpulsar.core.utils.failsafe +import com.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend +import com.himadieiev.redpulsar.core.utils.failsafe import redis.clients.jedis.UnifiedJedis import redis.clients.jedis.params.SetParams import java.time.Duration diff --git a/redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/integrationtests/CountDownLatchIntegrationTest.kt b/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/integrationtests/CountDownLatchIntegrationTest.kt similarity index 91% rename from redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/integrationtests/CountDownLatchIntegrationTest.kt rename to redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/integrationtests/CountDownLatchIntegrationTest.kt index a0227e8..46360cf 100644 --- a/redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/integrationtests/CountDownLatchIntegrationTest.kt +++ b/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/integrationtests/CountDownLatchIntegrationTest.kt @@ -1,16 +1,16 @@ -package me.himadieiev.redpulsar.jedis.integrationtests +package com.himadieiev.redpulsar.jedis.integrationtests import TestTags +import com.himadieiev.redpulsar.core.locks.ListeningCountDownLatch +import com.himadieiev.redpulsar.core.locks.api.CallResult +import com.himadieiev.redpulsar.core.locks.api.CountDownLatch +import com.himadieiev.redpulsar.core.utils.withTimeoutInThread +import com.himadieiev.redpulsar.jedis.locks.backends.JedisCountDownLatchBackend import getInstances import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.delay import kotlinx.coroutines.launch -import me.himadieiev.redpulsar.core.locks.ListeningCountDownLatch -import me.himadieiev.redpulsar.core.locks.api.CallResult -import me.himadieiev.redpulsar.core.locks.api.CountDownLatch -import me.himadieiev.redpulsar.core.utils.withTimeoutInThread -import me.himadieiev.redpulsar.jedis.locks.backends.JedisCountDownLatchBackend import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertFalse import org.junit.jupiter.api.Assertions.assertTrue diff --git a/redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/integrationtests/RedLockIntegrationTest.kt b/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/integrationtests/RedLockIntegrationTest.kt similarity index 90% rename from redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/integrationtests/RedLockIntegrationTest.kt rename to redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/integrationtests/RedLockIntegrationTest.kt index caee1c8..7ece909 100644 --- a/redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/integrationtests/RedLockIntegrationTest.kt +++ b/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/integrationtests/RedLockIntegrationTest.kt @@ -1,12 +1,12 @@ -package me.himadieiev.redpulsar.jedis.integrationtests +package com.himadieiev.redpulsar.jedis.integrationtests import TestTags +import com.himadieiev.redpulsar.core.locks.RedLock +import com.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend +import com.himadieiev.redpulsar.jedis.locks.backends.JedisLocksBackend import getInstances import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking -import me.himadieiev.redpulsar.core.locks.RedLock -import me.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend -import me.himadieiev.redpulsar.jedis.locks.backends.JedisLocksBackend import org.junit.jupiter.api.Assertions.assertFalse import org.junit.jupiter.api.Assertions.assertNull import org.junit.jupiter.api.Assertions.assertTrue diff --git a/redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/integrationtests/SemaphoreIntegrationTest.kt b/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/integrationtests/SemaphoreIntegrationTest.kt similarity index 95% rename from redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/integrationtests/SemaphoreIntegrationTest.kt rename to redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/integrationtests/SemaphoreIntegrationTest.kt index 6f65f41..a207139 100644 --- a/redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/integrationtests/SemaphoreIntegrationTest.kt +++ b/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/integrationtests/SemaphoreIntegrationTest.kt @@ -1,12 +1,12 @@ -package me.himadieiev.redpulsar.jedis.integrationtests +package com.himadieiev.redpulsar.jedis.integrationtests import TestTags +import com.himadieiev.redpulsar.core.locks.Semaphore +import com.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend +import com.himadieiev.redpulsar.jedis.locks.backends.JedisLocksBackend import getInstances import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking -import me.himadieiev.redpulsar.core.locks.Semaphore -import me.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend -import me.himadieiev.redpulsar.jedis.locks.backends.JedisLocksBackend import org.junit.jupiter.api.Assertions.assertFalse import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.BeforeEach diff --git a/redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/integrationtests/SimpleLockIntegrationTest.kt b/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/integrationtests/SimpleLockIntegrationTest.kt similarity index 90% rename from redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/integrationtests/SimpleLockIntegrationTest.kt rename to redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/integrationtests/SimpleLockIntegrationTest.kt index 705eec4..1217360 100644 --- a/redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/integrationtests/SimpleLockIntegrationTest.kt +++ b/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/integrationtests/SimpleLockIntegrationTest.kt @@ -1,12 +1,12 @@ -package me.himadieiev.redpulsar.jedis.integrationtests +package com.himadieiev.redpulsar.jedis.integrationtests import TestTags +import com.himadieiev.redpulsar.core.locks.SimpleLock +import com.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend +import com.himadieiev.redpulsar.jedis.locks.backends.JedisLocksBackend import getInstances import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking -import me.himadieiev.redpulsar.core.locks.SimpleLock -import me.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend -import me.himadieiev.redpulsar.jedis.locks.backends.JedisLocksBackend import org.junit.jupiter.api.Assertions.assertFalse import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Assertions.assertNull diff --git a/redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/locks/LockFactoryTest.kt b/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/locks/LockFactoryTest.kt similarity index 98% rename from redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/locks/LockFactoryTest.kt rename to redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/locks/LockFactoryTest.kt index 2c745bb..ae0c648 100644 --- a/redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/locks/LockFactoryTest.kt +++ b/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/locks/LockFactoryTest.kt @@ -1,4 +1,4 @@ -package me.himadieiev.redpulsar.jedis.locks +package com.himadieiev.redpulsar.jedis.locks import io.mockk.mockk import org.junit.jupiter.api.Test diff --git a/redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/locks/backends/JedisCountDownLatchBackendTest.kt b/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/locks/backends/JedisCountDownLatchBackendTest.kt similarity index 99% rename from redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/locks/backends/JedisCountDownLatchBackendTest.kt rename to redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/locks/backends/JedisCountDownLatchBackendTest.kt index bde0bff..a2abdcd 100644 --- a/redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/locks/backends/JedisCountDownLatchBackendTest.kt +++ b/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/locks/backends/JedisCountDownLatchBackendTest.kt @@ -1,4 +1,4 @@ -package me.himadieiev.redpulsar.jedis.locks.backends +package com.himadieiev.redpulsar.jedis.locks.backends import io.mockk.every import io.mockk.mockk diff --git a/redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/locks/backends/JedisLocksBackendTest.kt b/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/locks/backends/JedisLocksBackendTest.kt similarity index 99% rename from redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/locks/backends/JedisLocksBackendTest.kt rename to redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/locks/backends/JedisLocksBackendTest.kt index 7dd10e3..ba22366 100644 --- a/redpulsar-jedis/src/test/kotlin/me/himadieiev/redpulsar/jedis/locks/backends/JedisLocksBackendTest.kt +++ b/redpulsar-jedis/src/test/kotlin/com/himadieiev/redpulsar/jedis/locks/backends/JedisLocksBackendTest.kt @@ -1,4 +1,4 @@ -package me.himadieiev.redpulsar.jedis.locks.backends +package com.himadieiev.redpulsar.jedis.locks.backends import TestTags import equalsTo diff --git a/redpulsar-lettuce/README.md b/redpulsar-lettuce/README.md index 4af71bb..96a4c35 100644 --- a/redpulsar-lettuce/README.md +++ b/redpulsar-lettuce/README.md @@ -4,8 +4,8 @@ Gradle dependency: ```kotlin -implementation("me.himadieiev:redpulsar-core:0.1.1") -implementation("me.himadieiev:redpulsar-lettuce:0.1.1") +implementation("com.himadieiev:redpulsar-core:0.1.1") +implementation("com.himadieiev:redpulsar-lettuce:0.1.1") implementation("io.lettuce:lettuce-core:6.3.0.RELEASE") ``` diff --git a/redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/LettucePooled.kt b/redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/LettucePooled.kt similarity index 95% rename from redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/LettucePooled.kt rename to redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/LettucePooled.kt index 7099f81..92a951c 100644 --- a/redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/LettucePooled.kt +++ b/redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/LettucePooled.kt @@ -1,11 +1,11 @@ -package me.himadieiev.redpulsar.lettuce +package com.himadieiev.redpulsar.lettuce +import com.himadieiev.redpulsar.lettuce.abstracts.AbstractLettucePooled import io.lettuce.core.api.StatefulRedisConnection import io.lettuce.core.api.async.RedisAsyncCommands import io.lettuce.core.api.reactive.RedisReactiveCommands import io.lettuce.core.api.sync.RedisCommands import io.lettuce.core.support.ConnectionPoolSupport -import me.himadieiev.redpulsar.lettuce.abstracts.AbstractLettucePooled import org.apache.commons.pool2.impl.GenericObjectPool import org.apache.commons.pool2.impl.GenericObjectPoolConfig diff --git a/redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/LettucePubSubPooled.kt b/redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/LettucePubSubPooled.kt similarity index 96% rename from redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/LettucePubSubPooled.kt rename to redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/LettucePubSubPooled.kt index 213aa50..60bc736 100644 --- a/redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/LettucePubSubPooled.kt +++ b/redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/LettucePubSubPooled.kt @@ -1,5 +1,6 @@ -package me.himadieiev.redpulsar.lettuce +package com.himadieiev.redpulsar.lettuce +import com.himadieiev.redpulsar.lettuce.abstracts.AbstractLettucePooled import io.lettuce.core.api.StatefulRedisConnection import io.lettuce.core.api.async.RedisAsyncCommands import io.lettuce.core.api.reactive.RedisReactiveCommands @@ -9,7 +10,6 @@ import io.lettuce.core.pubsub.api.async.RedisPubSubAsyncCommands import io.lettuce.core.pubsub.api.reactive.RedisPubSubReactiveCommands import io.lettuce.core.pubsub.api.sync.RedisPubSubCommands import io.lettuce.core.support.ConnectionPoolSupport -import me.himadieiev.redpulsar.lettuce.abstracts.AbstractLettucePooled import org.apache.commons.pool2.impl.GenericObjectPool import org.apache.commons.pool2.impl.GenericObjectPoolConfig diff --git a/redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/abstracts/AbstractLettucePooled.kt b/redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/abstracts/AbstractLettucePooled.kt similarity index 93% rename from redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/abstracts/AbstractLettucePooled.kt rename to redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/abstracts/AbstractLettucePooled.kt index b527fa2..80fb625 100644 --- a/redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/abstracts/AbstractLettucePooled.kt +++ b/redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/abstracts/AbstractLettucePooled.kt @@ -1,10 +1,10 @@ -package me.himadieiev.redpulsar.lettuce.abstracts +package com.himadieiev.redpulsar.lettuce.abstracts +import com.himadieiev.redpulsar.lettuce.exceptions.LettucePooledException import io.lettuce.core.api.StatefulRedisConnection import io.lettuce.core.api.async.RedisAsyncCommands import io.lettuce.core.api.reactive.RedisReactiveCommands import io.lettuce.core.api.sync.RedisCommands -import me.himadieiev.redpulsar.lettuce.exceptions.LettucePooledException import org.apache.commons.pool2.impl.GenericObjectPool /** diff --git a/redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/exceptions/LettucePooledException.kt b/redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/exceptions/LettucePooledException.kt similarity index 63% rename from redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/exceptions/LettucePooledException.kt rename to redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/exceptions/LettucePooledException.kt index f4c3a48..fa738e4 100644 --- a/redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/exceptions/LettucePooledException.kt +++ b/redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/exceptions/LettucePooledException.kt @@ -1,3 +1,3 @@ -package me.himadieiev.redpulsar.lettuce.exceptions +package com.himadieiev.redpulsar.lettuce.exceptions class LettucePooledException(e: Exception, message: String) : RuntimeException(message, e) diff --git a/redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/locks/LockFactory.kt b/redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/locks/LockFactory.kt similarity index 87% rename from redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/locks/LockFactory.kt rename to redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/locks/LockFactory.kt index 3cd41fd..a2bd6b2 100644 --- a/redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/locks/LockFactory.kt +++ b/redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/locks/LockFactory.kt @@ -1,15 +1,15 @@ -package me.himadieiev.redpulsar.lettuce.locks +package com.himadieiev.redpulsar.lettuce.locks +import com.himadieiev.redpulsar.core.locks.ListeningCountDownLatch +import com.himadieiev.redpulsar.core.locks.RedLock +import com.himadieiev.redpulsar.core.locks.Semaphore +import com.himadieiev.redpulsar.core.locks.SimpleLock +import com.himadieiev.redpulsar.lettuce.LettucePooled +import com.himadieiev.redpulsar.lettuce.LettucePubSubPooled +import com.himadieiev.redpulsar.lettuce.locks.backends.LettuceCountDownLatchBackend +import com.himadieiev.redpulsar.lettuce.locks.backends.LettuceLocksBackend import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers -import me.himadieiev.redpulsar.core.locks.ListeningCountDownLatch -import me.himadieiev.redpulsar.core.locks.RedLock -import me.himadieiev.redpulsar.core.locks.Semaphore -import me.himadieiev.redpulsar.core.locks.SimpleLock -import me.himadieiev.redpulsar.lettuce.LettucePooled -import me.himadieiev.redpulsar.lettuce.LettucePubSubPooled -import me.himadieiev.redpulsar.lettuce.locks.backends.LettuceCountDownLatchBackend -import me.himadieiev.redpulsar.lettuce.locks.backends.LettuceLocksBackend import java.time.Duration /** diff --git a/redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/locks/backends/LettuceCountDownLatchBackend.kt b/redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/locks/backends/LettuceCountDownLatchBackend.kt similarity index 94% rename from redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/locks/backends/LettuceCountDownLatchBackend.kt rename to redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/locks/backends/LettuceCountDownLatchBackend.kt index 5e8257b..3964a52 100644 --- a/redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/locks/backends/LettuceCountDownLatchBackend.kt +++ b/redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/locks/backends/LettuceCountDownLatchBackend.kt @@ -1,5 +1,8 @@ -package me.himadieiev.redpulsar.lettuce.locks.backends +package com.himadieiev.redpulsar.lettuce.locks.backends +import com.himadieiev.redpulsar.core.locks.abstracts.backends.CountDownLatchBackend +import com.himadieiev.redpulsar.core.utils.failsafe +import com.himadieiev.redpulsar.lettuce.LettucePubSubPooled import io.lettuce.core.ScriptOutputType import io.lettuce.core.pubsub.RedisPubSubListener import kotlinx.coroutines.channels.awaitClose @@ -7,9 +10,6 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.callbackFlow import kotlinx.coroutines.isActive import kotlinx.coroutines.launch -import me.himadieiev.redpulsar.core.locks.abstracts.backends.CountDownLatchBackend -import me.himadieiev.redpulsar.core.utils.failsafe -import me.himadieiev.redpulsar.lettuce.LettucePubSubPooled import java.time.Duration /** diff --git a/redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/locks/backends/LettuceLocksBackend.kt b/redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/locks/backends/LettuceLocksBackend.kt similarity index 93% rename from redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/locks/backends/LettuceLocksBackend.kt rename to redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/locks/backends/LettuceLocksBackend.kt index b412867..c75f762 100644 --- a/redpulsar-lettuce/src/main/kotlin/me/himadieiev/redpulsar/lettuce/locks/backends/LettuceLocksBackend.kt +++ b/redpulsar-lettuce/src/main/kotlin/com/himadieiev/redpulsar/lettuce/locks/backends/LettuceLocksBackend.kt @@ -1,10 +1,10 @@ -package me.himadieiev.redpulsar.lettuce.locks.backends +package com.himadieiev.redpulsar.lettuce.locks.backends +import com.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend +import com.himadieiev.redpulsar.core.utils.failsafe +import com.himadieiev.redpulsar.lettuce.LettucePooled import io.lettuce.core.ScriptOutputType import io.lettuce.core.SetArgs -import me.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend -import me.himadieiev.redpulsar.core.utils.failsafe -import me.himadieiev.redpulsar.lettuce.LettucePooled import java.time.Duration /** diff --git a/redpulsar-lettuce/src/test/kotlin/TestCommons.kt b/redpulsar-lettuce/src/test/kotlin/TestCommons.kt index a5a53de..7d78d2d 100644 --- a/redpulsar-lettuce/src/test/kotlin/TestCommons.kt +++ b/redpulsar-lettuce/src/test/kotlin/TestCommons.kt @@ -1,11 +1,11 @@ +import com.himadieiev.redpulsar.lettuce.LettucePooled +import com.himadieiev.redpulsar.lettuce.LettucePubSubPooled import io.lettuce.core.RedisClient import io.lettuce.core.SetArgs import io.lettuce.core.api.StatefulRedisConnection import io.lettuce.core.codec.StringCodec import io.lettuce.core.protocol.CommandArgs import io.lettuce.core.pubsub.StatefulRedisPubSubConnection -import me.himadieiev.redpulsar.lettuce.LettucePooled -import me.himadieiev.redpulsar.lettuce.LettucePubSubPooled import org.apache.commons.pool2.impl.GenericObjectPoolConfig import java.time.Duration diff --git a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/LettucePooledTest.kt b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/LettucePooledTest.kt similarity index 96% rename from redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/LettucePooledTest.kt rename to redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/LettucePooledTest.kt index c5ad093..9312004 100644 --- a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/LettucePooledTest.kt +++ b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/LettucePooledTest.kt @@ -1,11 +1,11 @@ -package me.himadieiev.redpulsar.lettuce +package com.himadieiev.redpulsar.lettuce +import com.himadieiev.redpulsar.lettuce.exceptions.LettucePooledException import io.lettuce.core.api.StatefulRedisConnection import io.lettuce.core.api.sync.RedisCommands import io.mockk.every import io.mockk.mockk import io.mockk.verify -import me.himadieiev.redpulsar.lettuce.exceptions.LettucePooledException import org.apache.commons.pool2.impl.GenericObjectPool import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Tag diff --git a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/LettucePubSubPooledTest.kt b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/LettucePubSubPooledTest.kt similarity index 96% rename from redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/LettucePubSubPooledTest.kt rename to redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/LettucePubSubPooledTest.kt index bcbdca8..8c8cb1a 100644 --- a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/LettucePubSubPooledTest.kt +++ b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/LettucePubSubPooledTest.kt @@ -1,11 +1,11 @@ -package me.himadieiev.redpulsar.lettuce +package com.himadieiev.redpulsar.lettuce +import com.himadieiev.redpulsar.lettuce.exceptions.LettucePooledException import io.lettuce.core.pubsub.StatefulRedisPubSubConnection import io.lettuce.core.pubsub.api.sync.RedisPubSubCommands import io.mockk.every import io.mockk.mockk import io.mockk.verify -import me.himadieiev.redpulsar.lettuce.exceptions.LettucePooledException import org.apache.commons.pool2.impl.GenericObjectPool import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Tag diff --git a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/integrationtests/CountDownLatchIntegrationTest.kt b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/integrationtests/CountDownLatchIntegrationTest.kt similarity index 90% rename from redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/integrationtests/CountDownLatchIntegrationTest.kt rename to redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/integrationtests/CountDownLatchIntegrationTest.kt index aa0b174..4898820 100644 --- a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/integrationtests/CountDownLatchIntegrationTest.kt +++ b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/integrationtests/CountDownLatchIntegrationTest.kt @@ -1,17 +1,17 @@ -package me.himadieiev.redpulsar.lettuce.integrationtests +package com.himadieiev.redpulsar.lettuce.integrationtests import TestTags +import com.himadieiev.redpulsar.core.locks.ListeningCountDownLatch +import com.himadieiev.redpulsar.core.locks.api.CallResult +import com.himadieiev.redpulsar.core.locks.api.CountDownLatch +import com.himadieiev.redpulsar.core.utils.withTimeoutInThread +import com.himadieiev.redpulsar.lettuce.LettucePubSubPooled +import com.himadieiev.redpulsar.lettuce.locks.backends.LettuceCountDownLatchBackend import getInstances import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.delay import kotlinx.coroutines.launch -import me.himadieiev.redpulsar.core.locks.ListeningCountDownLatch -import me.himadieiev.redpulsar.core.locks.api.CallResult -import me.himadieiev.redpulsar.core.locks.api.CountDownLatch -import me.himadieiev.redpulsar.core.utils.withTimeoutInThread -import me.himadieiev.redpulsar.lettuce.LettucePubSubPooled -import me.himadieiev.redpulsar.lettuce.locks.backends.LettuceCountDownLatchBackend import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertFalse import org.junit.jupiter.api.Assertions.assertTrue diff --git a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/integrationtests/RedLockIntegrationTest.kt b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/integrationtests/RedLockIntegrationTest.kt similarity index 89% rename from redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/integrationtests/RedLockIntegrationTest.kt rename to redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/integrationtests/RedLockIntegrationTest.kt index 0644a9d..27b8ac0 100644 --- a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/integrationtests/RedLockIntegrationTest.kt +++ b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/integrationtests/RedLockIntegrationTest.kt @@ -1,13 +1,13 @@ -package me.himadieiev.redpulsar.lettuce.integrationtests +package com.himadieiev.redpulsar.lettuce.integrationtests import TestTags +import com.himadieiev.redpulsar.core.locks.RedLock +import com.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend +import com.himadieiev.redpulsar.lettuce.LettucePooled +import com.himadieiev.redpulsar.lettuce.locks.backends.LettuceLocksBackend import getPooledInstances import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking -import me.himadieiev.redpulsar.core.locks.RedLock -import me.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend -import me.himadieiev.redpulsar.lettuce.LettucePooled -import me.himadieiev.redpulsar.lettuce.locks.backends.LettuceLocksBackend import org.junit.jupiter.api.Assertions.assertFalse import org.junit.jupiter.api.Assertions.assertNull import org.junit.jupiter.api.Assertions.assertTrue diff --git a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/integrationtests/SemaphoreIntegrationTest.kt b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/integrationtests/SemaphoreIntegrationTest.kt similarity index 94% rename from redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/integrationtests/SemaphoreIntegrationTest.kt rename to redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/integrationtests/SemaphoreIntegrationTest.kt index d08e5e5..24f586f 100644 --- a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/integrationtests/SemaphoreIntegrationTest.kt +++ b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/integrationtests/SemaphoreIntegrationTest.kt @@ -1,13 +1,13 @@ -package me.himadieiev.redpulsar.lettuce.integrationtests +package com.himadieiev.redpulsar.lettuce.integrationtests import TestTags +import com.himadieiev.redpulsar.core.locks.Semaphore +import com.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend +import com.himadieiev.redpulsar.lettuce.LettucePooled +import com.himadieiev.redpulsar.lettuce.locks.backends.LettuceLocksBackend import getPooledInstances import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking -import me.himadieiev.redpulsar.core.locks.Semaphore -import me.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend -import me.himadieiev.redpulsar.lettuce.LettucePooled -import me.himadieiev.redpulsar.lettuce.locks.backends.LettuceLocksBackend import org.junit.jupiter.api.Assertions.assertFalse import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.BeforeEach diff --git a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/integrationtests/SimpleLockIntegrationTest.kt b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/integrationtests/SimpleLockIntegrationTest.kt similarity index 88% rename from redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/integrationtests/SimpleLockIntegrationTest.kt rename to redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/integrationtests/SimpleLockIntegrationTest.kt index 6c09bbb..e0f403f 100644 --- a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/integrationtests/SimpleLockIntegrationTest.kt +++ b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/integrationtests/SimpleLockIntegrationTest.kt @@ -1,13 +1,13 @@ -package me.himadieiev.redpulsar.lettuce.integrationtests +package com.himadieiev.redpulsar.lettuce.integrationtests import TestTags +import com.himadieiev.redpulsar.core.locks.SimpleLock +import com.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend +import com.himadieiev.redpulsar.lettuce.LettucePooled +import com.himadieiev.redpulsar.lettuce.locks.backends.LettuceLocksBackend import getPooledInstances import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking -import me.himadieiev.redpulsar.core.locks.SimpleLock -import me.himadieiev.redpulsar.core.locks.abstracts.backends.LocksBackend -import me.himadieiev.redpulsar.lettuce.LettucePooled -import me.himadieiev.redpulsar.lettuce.locks.backends.LettuceLocksBackend import org.junit.jupiter.api.Assertions.assertFalse import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Assertions.assertNull diff --git a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/locks/LockFactoryTest.kt b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/locks/LockFactoryTest.kt similarity index 98% rename from redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/locks/LockFactoryTest.kt rename to redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/locks/LockFactoryTest.kt index 503aec3..d1553c4 100644 --- a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/locks/LockFactoryTest.kt +++ b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/locks/LockFactoryTest.kt @@ -1,4 +1,4 @@ -package me.himadieiev.redpulsar.lettuce.locks +package com.himadieiev.redpulsar.lettuce.locks import io.mockk.mockk import org.junit.jupiter.api.Test diff --git a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/locks/backends/LettuceCountDownLatchBackendTest.kt b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/locks/backends/LettuceCountDownLatchBackendTest.kt similarity index 98% rename from redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/locks/backends/LettuceCountDownLatchBackendTest.kt rename to redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/locks/backends/LettuceCountDownLatchBackendTest.kt index 9d6adb9..54cd5d8 100644 --- a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/locks/backends/LettuceCountDownLatchBackendTest.kt +++ b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/locks/backends/LettuceCountDownLatchBackendTest.kt @@ -1,5 +1,6 @@ -package me.himadieiev.redpulsar.lettuce.locks.backends +package com.himadieiev.redpulsar.lettuce.locks.backends +import com.himadieiev.redpulsar.lettuce.LettucePubSubPooled import io.lettuce.core.ScriptOutputType import io.lettuce.core.pubsub.RedisPubSubListener import io.lettuce.core.pubsub.StatefulRedisPubSubConnection @@ -15,7 +16,6 @@ import kotlinx.coroutines.flow.first import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking import kotlinx.coroutines.withTimeout -import me.himadieiev.redpulsar.lettuce.LettucePubSubPooled import org.apache.commons.pool2.impl.GenericObjectPool import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeEach diff --git a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/locks/backends/LettuceLocksBackendTest.kt b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/locks/backends/LettuceLocksBackendTest.kt similarity index 98% rename from redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/locks/backends/LettuceLocksBackendTest.kt rename to redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/locks/backends/LettuceLocksBackendTest.kt index 56c3e38..fc9d074 100644 --- a/redpulsar-lettuce/src/test/kotlin/me/himadieiev/redpulsar/lettuce/locks/backends/LettuceLocksBackendTest.kt +++ b/redpulsar-lettuce/src/test/kotlin/com/himadieiev/redpulsar/lettuce/locks/backends/LettuceLocksBackendTest.kt @@ -1,5 +1,6 @@ -package me.himadieiev.redpulsar.lettuce.locks.backends +package com.himadieiev.redpulsar.lettuce.locks.backends +import com.himadieiev.redpulsar.lettuce.LettucePooled import equalsTo import io.lettuce.core.ScriptOutputType import io.lettuce.core.SetArgs @@ -8,7 +9,6 @@ import io.lettuce.core.api.sync.RedisCommands import io.mockk.every import io.mockk.mockk import io.mockk.verify -import me.himadieiev.redpulsar.lettuce.LettucePooled import org.apache.commons.pool2.impl.GenericObjectPool import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNull