Skip to content

Commit 42daa54

Browse files
authored
Follow up on shaded cache modules (#388)
* Add new module descriptions to README.adoc * Replace non-shaded Caffeine classes w/ shaded version in PulsarRuntimeHints.java
1 parent 156b85c commit 42daa54

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

README.adoc

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,29 +70,36 @@ There are several modules in Spring Pulsar. Here is a quick overview:
7070
=== spring-pulsar
7171
The main library that provides the API to access Apache Pulsar.
7272

73-
=== spring-pulsar-reactive
74-
Provides the API to access Apache Pulsar using a Reactive client.
73+
=== spring-pulsar-cache-provider
74+
Provides the interfaces for the cache provider used by the main library to cache producers.
75+
76+
=== spring-pulsar-cache-provider-caffeine
77+
Provides the implementation of the cache provider using a shaded version of Caffeine.
7578

7679
=== spring-pulsar-dependencies
7780
Provides a Gradle https://docs.gradle.org/current/userguide/java_platform_plugin.html[java-platform] that recommends dependency versions.
7881

7982
=== spring-pulsar-docs
8083
Provides reference docs and handles aggregating javadocs.
8184

85+
=== spring-pulsar-reactive
86+
Provides the API to access Apache Pulsar using a Reactive client.
87+
88+
=== spring-pulsar-reactive-spring-boot-starter
89+
Provides a dependency descriptor that can be included in your application to easily start using Spring Pulsar in Reactive and imperative fashions.
90+
91+
=== spring-pulsar-sample-apps
92+
Provides sample applications to illustrate Spring Pulsar functionality as well as provide ability for quick manual verification during development.
93+
8294
=== spring-pulsar-spring-boot-autoconfigure
8395
Provides Spring Boot auto-configuration for Spring Pulsar.
8496

8597
=== spring-pulsar-spring-boot-starter
8698
Provides a dependency descriptor that can be included in your application to easily start using Spring Pulsar in an imperative fashion.
8799

88-
=== spring-pulsar-reactive-spring-boot-starter
89-
Provides a dependency descriptor that can be included in your application to easily start using Spring Pulsar in Reactive and imperative fashions.
90-
91100
=== spring-pulsar-spring-cloud-stream-binder
92101
Provides a Spring Cloud Stream Binder implementation for Apache Pulsar.
93102

94-
=== spring-pulsar-sample-apps
95-
Provides sample applications to illustrate Spring Pulsar functionality as well as provide ability for quick manual verification during development.
96103

97104
== License
98105
Spring Pulsar is Open Source software released under the https://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0 license].

spring-pulsar/src/main/java/org/springframework/pulsar/aot/PulsarRuntimeHints.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,9 @@ public class PulsarRuntimeHints implements RuntimeHintsRegistrar {
5151
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
5252
ReflectionHints reflectionHints = hints.reflection();
5353
// The following components need access to declared constructors, invoke declared
54-
// methods
55-
// and introspect all public methods. The components are a mix of JDK classes,
56-
// core Pulsar classes,
57-
// some other shaded components available through Pulsar client.
54+
// methods and introspect all public methods. The components are a mix of JDK
55+
// classes, core Pulsar classes, and some other shaded components available
56+
// through Pulsar client.
5857
Stream.of(HashSet.class, LinkedHashMap.class, TreeMap.class, Authentication.class,
5958
AuthenticationDataProvider.class, SecretsSerializer.class, PulsarAdminBuilderImpl.class,
6059
OffloadProcessStatusImpl.class, Commands.class).forEach(
@@ -72,12 +71,10 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader)
7271
MemberCategory.INVOKE_DECLARED_METHODS, MemberCategory.INTROSPECT_PUBLIC_METHODS,
7372
MemberCategory.DECLARED_CLASSES, MemberCategory.DECLARED_FIELDS)));
7473

74+
// @formatter:off
7575
// These are shaded classes and other inaccessible interfaces/classes (thus using
7676
// string version of API).
77-
// @formatter:off
78-
Stream.of("com.github.benmanes.caffeine.cache.SSMSA",
79-
"com.github.benmanes.caffeine.cache.PSAMS",
80-
"org.apache.pulsar.client.admin.internal.JacksonConfigurator",
77+
Stream.of("org.apache.pulsar.client.admin.internal.JacksonConfigurator",
8178
"org.apache.pulsar.client.impl.conf.TopicConsumerConfigurationData",
8279
"org.apache.pulsar.client.impl.conf.TopicConsumerConfigurationData$TopicNameMatcher",
8380
"org.apache.pulsar.client.util.SecretsSerializer",
@@ -219,7 +216,9 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader)
219216
"org.apache.pulsar.shade.org.jvnet.hk2.internal.DynamicConfigurationServiceImpl",
220217
"org.apache.pulsar.shade.org.jvnet.hk2.internal.DynamicConfigurationServiceImpl",
221218
"org.apache.pulsar.shade.org.jvnet.hk2.internal.ServiceLocatorRuntimeImpl",
222-
"org.apache.pulsar.shade.org.jvnet.hk2.internal.ServiceLocatorRuntimeImpl")
219+
"org.apache.pulsar.shade.org.jvnet.hk2.internal.ServiceLocatorRuntimeImpl",
220+
"org.springframework.pulsar.shade.com.github.benmanes.caffeine.cache.SSMSA",
221+
"org.springframework.pulsar.shade.com.github.benmanes.caffeine.cache.PSAMS")
223222
.forEach(type -> reflectionHints.registerTypeIfPresent(classLoader, type,
224223
builder -> builder.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS,
225224
MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_DECLARED_METHODS,

0 commit comments

Comments
 (0)