diff --git a/spring-pulsar-cache-provider-caffeine/src/main/java/org/springframework/pulsar/core/CaffeineCacheProvider.java b/spring-pulsar-cache-provider-caffeine/src/main/java/org/springframework/pulsar/cache/provider/caffeine/CaffeineCacheProvider.java similarity index 92% rename from spring-pulsar-cache-provider-caffeine/src/main/java/org/springframework/pulsar/core/CaffeineCacheProvider.java rename to spring-pulsar-cache-provider-caffeine/src/main/java/org/springframework/pulsar/cache/provider/caffeine/CaffeineCacheProvider.java index f706ec3c..a892356b 100644 --- a/spring-pulsar-cache-provider-caffeine/src/main/java/org/springframework/pulsar/core/CaffeineCacheProvider.java +++ b/spring-pulsar-cache-provider-caffeine/src/main/java/org/springframework/pulsar/cache/provider/caffeine/CaffeineCacheProvider.java @@ -14,12 +14,14 @@ * limitations under the License. */ -package org.springframework.pulsar.core; +package org.springframework.pulsar.cache.provider.caffeine; import java.util.Map; import java.util.function.BiConsumer; import java.util.function.Function; +import org.springframework.pulsar.cache.provider.CacheProvider; + import com.github.benmanes.caffeine.cache.Cache; /** diff --git a/spring-pulsar-cache-provider-caffeine/src/main/java/org/springframework/pulsar/core/CaffeineCacheProviderFactory.java b/spring-pulsar-cache-provider-caffeine/src/main/java/org/springframework/pulsar/cache/provider/caffeine/CaffeineCacheProviderFactory.java similarity index 89% rename from spring-pulsar-cache-provider-caffeine/src/main/java/org/springframework/pulsar/core/CaffeineCacheProviderFactory.java rename to spring-pulsar-cache-provider-caffeine/src/main/java/org/springframework/pulsar/cache/provider/caffeine/CaffeineCacheProviderFactory.java index 2d3a9454..2984db0b 100644 --- a/spring-pulsar-cache-provider-caffeine/src/main/java/org/springframework/pulsar/core/CaffeineCacheProviderFactory.java +++ b/spring-pulsar-cache-provider-caffeine/src/main/java/org/springframework/pulsar/cache/provider/caffeine/CaffeineCacheProviderFactory.java @@ -14,10 +14,13 @@ * limitations under the License. */ -package org.springframework.pulsar.core; +package org.springframework.pulsar.cache.provider.caffeine; import java.time.Duration; +import org.springframework.pulsar.cache.provider.CacheProvider; +import org.springframework.pulsar.cache.provider.CacheProviderFactory; + import com.github.benmanes.caffeine.cache.Cache; import com.github.benmanes.caffeine.cache.Caffeine; import com.github.benmanes.caffeine.cache.RemovalListener; diff --git a/spring-pulsar-cache-provider-caffeine/src/main/resources/META-INF/services/org.springframework.pulsar.cache.provider.CacheProviderFactory b/spring-pulsar-cache-provider-caffeine/src/main/resources/META-INF/services/org.springframework.pulsar.cache.provider.CacheProviderFactory new file mode 100644 index 00000000..c8f05f84 --- /dev/null +++ b/spring-pulsar-cache-provider-caffeine/src/main/resources/META-INF/services/org.springframework.pulsar.cache.provider.CacheProviderFactory @@ -0,0 +1 @@ +org.springframework.pulsar.cache.provider.caffeine.CaffeineCacheProviderFactory diff --git a/spring-pulsar-cache-provider-caffeine/src/main/resources/META-INF/services/org.springframework.pulsar.core.CacheProviderFactory b/spring-pulsar-cache-provider-caffeine/src/main/resources/META-INF/services/org.springframework.pulsar.core.CacheProviderFactory deleted file mode 100644 index cf01003c..00000000 --- a/spring-pulsar-cache-provider-caffeine/src/main/resources/META-INF/services/org.springframework.pulsar.core.CacheProviderFactory +++ /dev/null @@ -1 +0,0 @@ -org.springframework.pulsar.core.CaffeineCacheProviderFactory diff --git a/spring-pulsar-cache-provider/src/main/java/org/springframework/pulsar/core/CacheProvider.java b/spring-pulsar-cache-provider/src/main/java/org/springframework/pulsar/cache/provider/CacheProvider.java similarity index 97% rename from spring-pulsar-cache-provider/src/main/java/org/springframework/pulsar/core/CacheProvider.java rename to spring-pulsar-cache-provider/src/main/java/org/springframework/pulsar/cache/provider/CacheProvider.java index 9b07c68d..d4b6979c 100644 --- a/spring-pulsar-cache-provider/src/main/java/org/springframework/pulsar/core/CacheProvider.java +++ b/spring-pulsar-cache-provider/src/main/java/org/springframework/pulsar/cache/provider/CacheProvider.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.pulsar.core; +package org.springframework.pulsar.cache.provider; import java.util.Map; import java.util.function.BiConsumer; diff --git a/spring-pulsar-cache-provider/src/main/java/org/springframework/pulsar/core/CacheProviderFactory.java b/spring-pulsar-cache-provider/src/main/java/org/springframework/pulsar/cache/provider/CacheProviderFactory.java similarity index 97% rename from spring-pulsar-cache-provider/src/main/java/org/springframework/pulsar/core/CacheProviderFactory.java rename to spring-pulsar-cache-provider/src/main/java/org/springframework/pulsar/cache/provider/CacheProviderFactory.java index 08f624c5..6bbf3fd8 100644 --- a/spring-pulsar-cache-provider/src/main/java/org/springframework/pulsar/core/CacheProviderFactory.java +++ b/spring-pulsar-cache-provider/src/main/java/org/springframework/pulsar/cache/provider/CacheProviderFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.pulsar.core; +package org.springframework.pulsar.cache.provider; import java.time.Duration; import java.util.ServiceLoader; diff --git a/spring-pulsar-cache-provider/src/test/java/org/springframework/pulsar/core/CacheProviderFactoryTests.java b/spring-pulsar-cache-provider/src/test/java/org/springframework/pulsar/cache/provider/CacheProviderFactoryTests.java similarity index 96% rename from spring-pulsar-cache-provider/src/test/java/org/springframework/pulsar/core/CacheProviderFactoryTests.java rename to spring-pulsar-cache-provider/src/test/java/org/springframework/pulsar/cache/provider/CacheProviderFactoryTests.java index b67f0983..e0f936c8 100644 --- a/spring-pulsar-cache-provider/src/test/java/org/springframework/pulsar/core/CacheProviderFactoryTests.java +++ b/spring-pulsar-cache-provider/src/test/java/org/springframework/pulsar/cache/provider/CacheProviderFactoryTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.pulsar.core; +package org.springframework.pulsar.cache.provider; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-pulsar-cache-provider/src/test/resources/META-INF/services/org.springframework.pulsar.cache.provider.CacheProviderFactory b/spring-pulsar-cache-provider/src/test/resources/META-INF/services/org.springframework.pulsar.cache.provider.CacheProviderFactory new file mode 100644 index 00000000..6fedb98e --- /dev/null +++ b/spring-pulsar-cache-provider/src/test/resources/META-INF/services/org.springframework.pulsar.cache.provider.CacheProviderFactory @@ -0,0 +1 @@ +org.springframework.pulsar.cache.provider.CacheProviderFactoryTests$TestCacheProviderFactory diff --git a/spring-pulsar-cache-provider/src/test/resources/META-INF/services/org.springframework.pulsar.core.CacheProviderFactory b/spring-pulsar-cache-provider/src/test/resources/META-INF/services/org.springframework.pulsar.core.CacheProviderFactory deleted file mode 100644 index 74fa5bd4..00000000 --- a/spring-pulsar-cache-provider/src/test/resources/META-INF/services/org.springframework.pulsar.core.CacheProviderFactory +++ /dev/null @@ -1 +0,0 @@ -org.springframework.pulsar.core.CacheProviderFactoryTests$TestCacheProviderFactory diff --git a/spring-pulsar/src/main/java/org/springframework/pulsar/core/CachingPulsarProducerFactory.java b/spring-pulsar/src/main/java/org/springframework/pulsar/core/CachingPulsarProducerFactory.java index a79294f3..769e8bc1 100644 --- a/spring-pulsar/src/main/java/org/springframework/pulsar/core/CachingPulsarProducerFactory.java +++ b/spring-pulsar/src/main/java/org/springframework/pulsar/core/CachingPulsarProducerFactory.java @@ -38,6 +38,8 @@ import org.springframework.beans.factory.DisposableBean; import org.springframework.core.log.LogAccessor; import org.springframework.lang.Nullable; +import org.springframework.pulsar.cache.provider.CacheProvider; +import org.springframework.pulsar.cache.provider.CacheProviderFactory; import org.springframework.util.Assert; /** diff --git a/spring-pulsar/src/test/java/org/springframework/pulsar/core/CachingPulsarProducerFactoryTests.java b/spring-pulsar/src/test/java/org/springframework/pulsar/core/CachingPulsarProducerFactoryTests.java index 2e9681a0..05be92bc 100644 --- a/spring-pulsar/src/test/java/org/springframework/pulsar/core/CachingPulsarProducerFactoryTests.java +++ b/spring-pulsar/src/test/java/org/springframework/pulsar/core/CachingPulsarProducerFactoryTests.java @@ -46,6 +46,7 @@ import org.junit.jupiter.params.provider.MethodSource; import org.springframework.lang.Nullable; +import org.springframework.pulsar.cache.provider.CacheProvider; import org.springframework.pulsar.core.CachingPulsarProducerFactory.ProducerCacheKey; import org.springframework.pulsar.core.CachingPulsarProducerFactory.ProducerWithCloseCallback; import org.springframework.test.util.ReflectionTestUtils;