Skip to content

Commit a277bf8

Browse files
authored
Move cache provider into proper package. (#447)
The cache provider modules source files were previously packaged under the `spring.pulsar.core` name. This moves them to a package name that is specific to their module name. The motivation of the change is to preemptively reduce confusion w/ the Java module system.
1 parent 9bac60b commit a277bf8

File tree

11 files changed

+15
-7
lines changed

11 files changed

+15
-7
lines changed

spring-pulsar-cache-provider-caffeine/src/main/java/org/springframework/pulsar/core/CaffeineCacheProvider.java renamed to spring-pulsar-cache-provider-caffeine/src/main/java/org/springframework/pulsar/cache/provider/caffeine/CaffeineCacheProvider.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.pulsar.core;
17+
package org.springframework.pulsar.cache.provider.caffeine;
1818

1919
import java.util.Map;
2020
import java.util.function.BiConsumer;
2121
import java.util.function.Function;
2222

23+
import org.springframework.pulsar.cache.provider.CacheProvider;
24+
2325
import com.github.benmanes.caffeine.cache.Cache;
2426

2527
/**

spring-pulsar-cache-provider-caffeine/src/main/java/org/springframework/pulsar/core/CaffeineCacheProviderFactory.java renamed to spring-pulsar-cache-provider-caffeine/src/main/java/org/springframework/pulsar/cache/provider/caffeine/CaffeineCacheProviderFactory.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.pulsar.core;
17+
package org.springframework.pulsar.cache.provider.caffeine;
1818

1919
import java.time.Duration;
2020

21+
import org.springframework.pulsar.cache.provider.CacheProvider;
22+
import org.springframework.pulsar.cache.provider.CacheProviderFactory;
23+
2124
import com.github.benmanes.caffeine.cache.Cache;
2225
import com.github.benmanes.caffeine.cache.Caffeine;
2326
import com.github.benmanes.caffeine.cache.RemovalListener;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.springframework.pulsar.cache.provider.caffeine.CaffeineCacheProviderFactory

spring-pulsar-cache-provider-caffeine/src/main/resources/META-INF/services/org.springframework.pulsar.core.CacheProviderFactory

Lines changed: 0 additions & 1 deletion
This file was deleted.

spring-pulsar-cache-provider/src/main/java/org/springframework/pulsar/core/CacheProvider.java renamed to spring-pulsar-cache-provider/src/main/java/org/springframework/pulsar/cache/provider/CacheProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.pulsar.core;
17+
package org.springframework.pulsar.cache.provider;
1818

1919
import java.util.Map;
2020
import java.util.function.BiConsumer;

spring-pulsar-cache-provider/src/main/java/org/springframework/pulsar/core/CacheProviderFactory.java renamed to spring-pulsar-cache-provider/src/main/java/org/springframework/pulsar/cache/provider/CacheProviderFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.pulsar.core;
17+
package org.springframework.pulsar.cache.provider;
1818

1919
import java.time.Duration;
2020
import java.util.ServiceLoader;

spring-pulsar-cache-provider/src/test/java/org/springframework/pulsar/core/CacheProviderFactoryTests.java renamed to spring-pulsar-cache-provider/src/test/java/org/springframework/pulsar/cache/provider/CacheProviderFactoryTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.pulsar.core;
17+
package org.springframework.pulsar.cache.provider;
1818

1919
import static org.assertj.core.api.Assertions.assertThat;
2020

Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.springframework.pulsar.cache.provider.CacheProviderFactoryTests$TestCacheProviderFactory

spring-pulsar-cache-provider/src/test/resources/META-INF/services/org.springframework.pulsar.core.CacheProviderFactory

Lines changed: 0 additions & 1 deletion
This file was deleted.

spring-pulsar/src/main/java/org/springframework/pulsar/core/CachingPulsarProducerFactory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
import org.springframework.beans.factory.DisposableBean;
3939
import org.springframework.core.log.LogAccessor;
4040
import org.springframework.lang.Nullable;
41+
import org.springframework.pulsar.cache.provider.CacheProvider;
42+
import org.springframework.pulsar.cache.provider.CacheProviderFactory;
4143
import org.springframework.util.Assert;
4244

4345
/**

0 commit comments

Comments
 (0)