Skip to content

Commit 32bc840

Browse files
committed
Standardize Javadoc example headings
Replaced Javadoc example section labels from `<p>Example Usage:` to `<h3>Example Usage</h3>` across discovery, service registry, fault-tolerance, and OpenFeign components. This aligns documentation formatting for clearer rendered structure and consistent API docs throughout the modules.
1 parent 210c6b1 commit 32bc840

44 files changed

Lines changed: 191 additions & 191 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

microsphere-spring-cloud-commons/src/main/java/io/microsphere/spring/cloud/client/discovery/ReactiveDiscoveryClientAdapter.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class ReactiveDiscoveryClientAdapter implements DiscoveryClient {
4343
* Create a new {@link ReactiveDiscoveryClientAdapter} that wraps the given
4444
* {@link ReactiveDiscoveryClient} as a blocking {@link DiscoveryClient}.
4545
*
46-
* <p>Example Usage:
46+
* <h3>Example Usage</h3>
4747
* <pre>{@code
4848
* ReactiveDiscoveryClient reactiveClient = new SimpleReactiveDiscoveryClient(properties);
4949
* DiscoveryClient adapter = new ReactiveDiscoveryClientAdapter(reactiveClient);
@@ -59,7 +59,7 @@ public ReactiveDiscoveryClientAdapter(ReactiveDiscoveryClient reactiveDiscoveryC
5959
/**
6060
* Delegates to the underlying {@link ReactiveDiscoveryClient#description()} method.
6161
*
62-
* <p>Example Usage:
62+
* <h3>Example Usage</h3>
6363
* <pre>{@code
6464
* String desc = adapter.description();
6565
* }</pre>
@@ -75,7 +75,7 @@ public String description() {
7575
* Returns a blocking list of {@link ServiceInstance} objects for the given service ID
7676
* by collecting results from the underlying {@link ReactiveDiscoveryClient}.
7777
*
78-
* <p>Example Usage:
78+
* <h3>Example Usage</h3>
7979
* <pre>{@code
8080
* List<ServiceInstance> instances = adapter.getInstances("test-service");
8181
* }</pre>
@@ -93,7 +93,7 @@ public List<ServiceInstance> getInstances(String serviceId) {
9393
* Returns a blocking list of service names by collecting results from the
9494
* underlying {@link ReactiveDiscoveryClient}.
9595
*
96-
* <p>Example Usage:
96+
* <h3>Example Usage</h3>
9797
* <pre>{@code
9898
* List<String> services = adapter.getServices();
9999
* }</pre>
@@ -110,7 +110,7 @@ public List<String> getServices() {
110110
* Delegates to the underlying {@link ReactiveDiscoveryClient#probe()} method to
111111
* verify the discovery client is operational.
112112
*
113-
* <p>Example Usage:
113+
* <h3>Example Usage</h3>
114114
* <pre>{@code
115115
* adapter.probe();
116116
* }</pre>
@@ -123,7 +123,7 @@ public void probe() {
123123
/**
124124
* Returns the order value from the underlying {@link ReactiveDiscoveryClient}.
125125
*
126-
* <p>Example Usage:
126+
* <h3>Example Usage</h3>
127127
* <pre>{@code
128128
* int order = adapter.getOrder();
129129
* }</pre>

microsphere-spring-cloud-commons/src/main/java/io/microsphere/spring/cloud/client/discovery/UnionDiscoveryClient.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
/**
4040
* The {@link DiscoveryClient} implementation for a union of the given {@link DiscoveryClient}
4141
*
42-
* <p>Example Usage:
42+
* <h3>Example Usage</h3>
4343
* <pre>{@code
4444
* // Register UnionDiscoveryClient as a Spring bean, then retrieve merged service instances
4545
* UnionDiscoveryClient unionDiscoveryClient = applicationContext.getBean(UnionDiscoveryClient.class);
@@ -60,7 +60,7 @@ public final class UnionDiscoveryClient implements DiscoveryClient, ApplicationC
6060
/**
6161
* Returns a human-readable description of this {@link DiscoveryClient}.
6262
*
63-
* <p>Example Usage:
63+
* <h3>Example Usage</h3>
6464
* <pre>{@code
6565
* String desc = unionDiscoveryClient.description();
6666
* }</pre>
@@ -76,7 +76,7 @@ public String description() {
7676
* Returns a merged list of {@link ServiceInstance} objects from all registered
7777
* {@link DiscoveryClient} instances for the given service ID.
7878
*
79-
* <p>Example Usage:
79+
* <h3>Example Usage</h3>
8080
* <pre>{@code
8181
* List<ServiceInstance> instances = unionDiscoveryClient.getInstances("test");
8282
* }</pre>
@@ -101,7 +101,7 @@ public List<ServiceInstance> getInstances(String serviceId) {
101101
* Returns a deduplicated list of service names from all registered {@link DiscoveryClient}
102102
* instances, preserving insertion order.
103103
*
104-
* <p>Example Usage:
104+
* <h3>Example Usage</h3>
105105
* <pre>{@code
106106
* List<String> services = unionDiscoveryClient.getServices();
107107
* }</pre>
@@ -126,7 +126,7 @@ public List<String> getServices() {
126126
* {@link CompositeDiscoveryClient} and this instance itself. The list is lazily initialized
127127
* from the {@link ApplicationContext} on first access and cached for subsequent calls.
128128
*
129-
* <p>Example Usage:
129+
* <h3>Example Usage</h3>
130130
* <pre>{@code
131131
* UnionDiscoveryClient unionClient = applicationContext.getBean(UnionDiscoveryClient.class);
132132
* List<DiscoveryClient> clients = unionClient.getDiscoveryClients();
@@ -158,7 +158,7 @@ public List<DiscoveryClient> getDiscoveryClients() {
158158
* Returns the order value of this client. This client uses {@code HIGHEST_PRECEDENCE}
159159
* to ensure it takes priority over other {@link DiscoveryClient} implementations.
160160
*
161-
* <p>Example Usage:
161+
* <h3>Example Usage</h3>
162162
* <pre>{@code
163163
* int order = unionDiscoveryClient.getOrder();
164164
* }</pre>
@@ -174,7 +174,7 @@ public int getOrder() {
174174
* Callback invoked after all singleton beans have been instantiated. Eagerly initializes
175175
* the internal list of {@link DiscoveryClient} instances.
176176
*
177-
* <p>Example Usage:
177+
* <h3>Example Usage</h3>
178178
* <pre>{@code
179179
* // Automatically called by the Spring container after singleton initialization
180180
* unionDiscoveryClient.afterSingletonsInstantiated();
@@ -188,7 +188,7 @@ public void afterSingletonsInstantiated() {
188188
/**
189189
* Clears the cached list of {@link DiscoveryClient} instances when this bean is destroyed.
190190
*
191-
* <p>Example Usage:
191+
* <h3>Example Usage</h3>
192192
* <pre>{@code
193193
* // Automatically called by the Spring container on shutdown
194194
* unionDiscoveryClient.destroy();
@@ -204,7 +204,7 @@ public void destroy() throws Exception {
204204
/**
205205
* Sets the {@link ApplicationContext} used to look up {@link DiscoveryClient} beans.
206206
*
207-
* <p>Example Usage:
207+
* <h3>Example Usage</h3>
208208
* <pre>{@code
209209
* // Automatically called by the Spring container
210210
* unionDiscoveryClient.setApplicationContext(applicationContext);

microsphere-spring-cloud-commons/src/main/java/io/microsphere/spring/cloud/client/discovery/autoconfigure/DiscoveryClientAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public static class UnionConfiguration {
7676
* Creates a {@link UnionDiscoveryClient} bean that aggregates all {@link DiscoveryClient}
7777
* instances in the {@link org.springframework.context.ApplicationContext}.
7878
*
79-
* <p>Example Usage:
79+
* <h3>Example Usage</h3>
8080
* <pre>{@code
8181
* // Activated when microsphere.spring.cloud.client.discovery.mode=union
8282
* UnionDiscoveryClient client = applicationContext.getBean(UnionDiscoveryClient.class);

microsphere-spring-cloud-commons/src/main/java/io/microsphere/spring/cloud/client/discovery/autoconfigure/ReactiveDiscoveryClientAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static class BlockingConfiguration {
5858
* Creates a {@link ReactiveDiscoveryClientAdapter} bean that adapts a
5959
* {@link ReactiveDiscoveryClient} to the blocking {@link org.springframework.cloud.client.discovery.DiscoveryClient} interface.
6060
*
61-
* <p>Example Usage:
61+
* <h3>Example Usage</h3>
6262
* <pre>{@code
6363
* // Auto-configured when both reactive and blocking discovery are enabled
6464
* DiscoveryClient client = applicationContext.getBean(ReactiveDiscoveryClientAdapter.class);

microsphere-spring-cloud-commons/src/main/java/io/microsphere/spring/cloud/client/service/registry/InMemoryServiceRegistry.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class InMemoryServiceRegistry implements ServiceRegistry {
4040
* Registers the given {@link Registration} instance in the in-memory storage,
4141
* keyed by its instance ID.
4242
*
43-
* <p>Example Usage:
43+
* <h3>Example Usage</h3>
4444
* <pre>{@code
4545
* InMemoryServiceRegistry registry = new InMemoryServiceRegistry();
4646
* Registration registration = createRegistration();
@@ -58,7 +58,7 @@ public void register(Registration registration) {
5858
/**
5959
* Removes the given {@link Registration} instance from the in-memory storage.
6060
*
61-
* <p>Example Usage:
61+
* <h3>Example Usage</h3>
6262
* <pre>{@code
6363
* InMemoryServiceRegistry registry = new InMemoryServiceRegistry();
6464
* Registration registration = createRegistration();
@@ -77,7 +77,7 @@ public void deregister(Registration registration) {
7777
/**
7878
* Closes this registry by clearing all stored {@link Registration} instances.
7979
*
80-
* <p>Example Usage:
80+
* <h3>Example Usage</h3>
8181
* <pre>{@code
8282
* InMemoryServiceRegistry registry = new InMemoryServiceRegistry();
8383
* registry.register(registration);
@@ -93,7 +93,7 @@ public void close() {
9393
* Sets the status of the given {@link Registration} by storing it in
9494
* the registration's metadata under the {@code _status_} key.
9595
*
96-
* <p>Example Usage:
96+
* <h3>Example Usage</h3>
9797
* <pre>{@code
9898
* InMemoryServiceRegistry registry = new InMemoryServiceRegistry();
9999
* registry.register(registration);
@@ -114,7 +114,7 @@ public void setStatus(Registration registration, String status) {
114114
/**
115115
* Retrieves the status of the given {@link Registration} from its metadata.
116116
*
117-
* <p>Example Usage:
117+
* <h3>Example Usage</h3>
118118
* <pre>{@code
119119
* InMemoryServiceRegistry registry = new InMemoryServiceRegistry();
120120
* registry.register(registration);
@@ -138,7 +138,7 @@ public Object getStatus(Registration registration) {
138138
* Retrieves the metadata {@link Map} for the given {@link Registration}
139139
* from the in-memory storage.
140140
*
141-
* <p>Example Usage:
141+
* <h3>Example Usage</h3>
142142
* <pre>{@code
143143
* InMemoryServiceRegistry registry = new InMemoryServiceRegistry();
144144
* registry.register(registration);

microsphere-spring-cloud-commons/src/main/java/io/microsphere/spring/cloud/client/service/registry/MultipleAutoServiceRegistration.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class MultipleAutoServiceRegistration extends AbstractAutoServiceRegistra
2525
* {@link MultipleRegistration}, {@link ServiceRegistry}, and
2626
* {@link AutoServiceRegistrationProperties}.
2727
*
28-
* <p>Example Usage:
28+
* <h3>Example Usage</h3>
2929
* <pre>{@code
3030
* MultipleRegistration registration = new MultipleRegistration(registrations);
3131
* ServiceRegistry<MultipleRegistration> serviceRegistry = new InMemoryServiceRegistry();
@@ -50,7 +50,7 @@ public MultipleAutoServiceRegistration(MultipleRegistration multipleRegistration
5050
* Returns the configuration object for this auto service registration.
5151
* This implementation always returns {@code null}.
5252
*
53-
* <p>Example Usage:
53+
* <h3>Example Usage</h3>
5454
* <pre>{@code
5555
* MultipleAutoServiceRegistration autoReg = ...;
5656
* Object config = autoReg.getConfiguration(); // null
@@ -67,7 +67,7 @@ protected Object getConfiguration() {
6767
* Determines whether this auto service registration is enabled based on the
6868
* {@link AutoServiceRegistrationProperties}.
6969
*
70-
* <p>Example Usage:
70+
* <h3>Example Usage</h3>
7171
* <pre>{@code
7272
* MultipleAutoServiceRegistration autoReg = ...;
7373
* boolean enabled = autoReg.isEnabled();
@@ -83,7 +83,7 @@ protected boolean isEnabled() {
8383
/**
8484
* Returns the {@link MultipleRegistration} managed by this auto service registration.
8585
*
86-
* <p>Example Usage:
86+
* <h3>Example Usage</h3>
8787
* <pre>{@code
8888
* MultipleAutoServiceRegistration autoReg = ...;
8989
* MultipleRegistration registration = autoReg.getRegistration();
@@ -100,7 +100,7 @@ protected MultipleRegistration getRegistration() {
100100
* Returns the management {@link MultipleRegistration}, which is the same as
101101
* the primary registration in this implementation.
102102
*
103-
* <p>Example Usage:
103+
* <h3>Example Usage</h3>
104104
* <pre>{@code
105105
* MultipleAutoServiceRegistration autoReg = ...;
106106
* MultipleRegistration mgmtRegistration = autoReg.getManagementRegistration();

microsphere-spring-cloud-commons/src/main/java/io/microsphere/spring/cloud/client/service/registry/MultipleRegistration.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class MultipleRegistration implements Registration {
3434
* {@link Registration} instances. The last registration in the collection becomes
3535
* the default registration.
3636
*
37-
* <p>Example Usage:
37+
* <h3>Example Usage</h3>
3838
* <pre>{@code
3939
* DefaultRegistration registration = new DefaultRegistration();
4040
* registration.setServiceId("test-service");
@@ -59,7 +59,7 @@ public MultipleRegistration(Collection<Registration> registrations) {
5959
/**
6060
* Returns the instance ID from the default {@link Registration}.
6161
*
62-
* <p>Example Usage:
62+
* <h3>Example Usage</h3>
6363
* <pre>{@code
6464
* MultipleRegistration multipleRegistration = new MultipleRegistration(registrations);
6565
* String instanceId = multipleRegistration.getInstanceId();
@@ -75,7 +75,7 @@ public String getInstanceId() {
7575
/**
7676
* Returns the service ID from the default {@link Registration}.
7777
*
78-
* <p>Example Usage:
78+
* <h3>Example Usage</h3>
7979
* <pre>{@code
8080
* MultipleRegistration multipleRegistration = new MultipleRegistration(registrations);
8181
* String serviceId = multipleRegistration.getServiceId();
@@ -91,7 +91,7 @@ public String getServiceId() {
9191
/**
9292
* Returns the host from the default {@link Registration}.
9393
*
94-
* <p>Example Usage:
94+
* <h3>Example Usage</h3>
9595
* <pre>{@code
9696
* MultipleRegistration multipleRegistration = new MultipleRegistration(registrations);
9797
* String host = multipleRegistration.getHost();
@@ -107,7 +107,7 @@ public String getHost() {
107107
/**
108108
* Returns the port from the default {@link Registration}.
109109
*
110-
* <p>Example Usage:
110+
* <h3>Example Usage</h3>
111111
* <pre>{@code
112112
* MultipleRegistration multipleRegistration = new MultipleRegistration(registrations);
113113
* int port = multipleRegistration.getPort();
@@ -123,7 +123,7 @@ public int getPort() {
123123
/**
124124
* Returns whether the default {@link Registration} is secure.
125125
*
126-
* <p>Example Usage:
126+
* <h3>Example Usage</h3>
127127
* <pre>{@code
128128
* MultipleRegistration multipleRegistration = new MultipleRegistration(registrations);
129129
* boolean secure = multipleRegistration.isSecure();
@@ -139,7 +139,7 @@ public boolean isSecure() {
139139
/**
140140
* Returns the {@link URI} from the default {@link Registration}.
141141
*
142-
* <p>Example Usage:
142+
* <h3>Example Usage</h3>
143143
* <pre>{@code
144144
* MultipleRegistration multipleRegistration = new MultipleRegistration(registrations);
145145
* URI uri = multipleRegistration.getUri();
@@ -156,7 +156,7 @@ public URI getUri() {
156156
* Returns the aggregated {@link RegistrationMetaData} that synchronizes metadata
157157
* across all underlying {@link Registration} instances.
158158
*
159-
* <p>Example Usage:
159+
* <h3>Example Usage</h3>
160160
* <pre>{@code
161161
* MultipleRegistration multipleRegistration = new MultipleRegistration(registrations);
162162
* Map<String, String> metadata = multipleRegistration.getMetadata();
@@ -173,7 +173,7 @@ public Map<String, String> getMetadata() {
173173
* Returns the default {@link Registration} instance, which is the last registration
174174
* provided during construction.
175175
*
176-
* <p>Example Usage:
176+
* <h3>Example Usage</h3>
177177
* <pre>{@code
178178
* MultipleRegistration multipleRegistration = new MultipleRegistration(registrations);
179179
* Registration defaultReg = multipleRegistration.getDefaultRegistration();
@@ -189,7 +189,7 @@ public Registration getDefaultRegistration() {
189189
* Retrieves a specific {@link Registration} by its class type. If the specified
190190
* class is {@link Registration} itself, returns this {@link MultipleRegistration}.
191191
*
192-
* <p>Example Usage:
192+
* <h3>Example Usage</h3>
193193
* <pre>{@code
194194
* MultipleRegistration multipleRegistration = new MultipleRegistration(registrations);
195195
* DefaultRegistration specific = multipleRegistration.special(DefaultRegistration.class);

0 commit comments

Comments
 (0)