Skip to content

Commit

Permalink
Move cache provider into proper package. (#447)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
onobc authored Sep 14, 2023
1 parent 9bac60b commit a277bf8
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.springframework.pulsar.cache.provider.caffeine.CaffeineCacheProviderFactory

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.springframework.pulsar.cache.provider.CacheProviderFactoryTests$TestCacheProviderFactory

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a277bf8

Please sign in to comment.