Skip to content

Commit 2d6c672

Browse files
Merge pull request #51257 from holly-cummins/correct-javadoc
Correct javadoc and add javadoc for service config
2 parents 56d7655 + 8198886 commit 2d6c672

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

core/deployment/src/main/java/io/quarkus/deployment/builditem/DevServicesResultBuildItem.java

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ public static <T extends Startable> OwnedServiceBuilder<T> owned() {
8989
}
9090

9191
/**
92-
* @deprecated use DevServicesResultBuildItem.builder() instead
92+
* @deprecated use {@link DevServicesResultBuildItem#owned()} or {@link DevServicesResultBuildItem#discovered()} instead
9393
*/
9494
@Deprecated
9595
public DevServicesResultBuildItem(String name, String containerId, Map<String, String> config) {
9696
this(name, null, containerId, config);
9797
}
9898

9999
/**
100-
* @deprecated use DevServicesResultBuildItem.builder() instead
100+
* @deprecated use {@link DevServicesResultBuildItem#owned()} or {@link DevServicesResultBuildItem#discovered()} instead
101101
*/
102102
@Deprecated
103103
public DevServicesResultBuildItem(String name, String description, String containerId, Map<String, String> config) {
@@ -114,7 +114,7 @@ public DevServicesResultBuildItem(String name, String description, String contai
114114
}
115115

116116
/**
117-
* @deprecated use DevServicesResultBuildItem.builder() instead
117+
* @deprecated use {@link DevServicesResultBuildItem#owned()} or {@link DevServicesResultBuildItem#discovered()} instead
118118
*/
119119
@Deprecated
120120
public DevServicesResultBuildItem(String name,
@@ -161,6 +161,11 @@ public String getServiceName() {
161161
return serviceName;
162162
}
163163

164+
/**
165+
* {@see OwnedServiceBuilder#serviceConfig}
166+
*
167+
* @return the identifying configuration
168+
*/
164169
public Object getServiceConfig() {
165170
return serviceConfig;
166171
}
@@ -290,6 +295,20 @@ public OwnedServiceBuilder<T> serviceName(String serviceName) {
290295
return this;
291296
}
292297

298+
/**
299+
* Declares the configuration of this service. This is used as a uniqueness identifier to establish whether
300+
* services should be restarted, for example between live reloads.
301+
* Usually it would be the config object passed in to the build step,
302+
* but if the reuse semantics are different, it could be a subset or superset of that object.
303+
* If you want your service to be restarted when the config is different, and re-used otherwise, pass
304+
* through your config. If you want it to be always restarted on live reloads, you could pass through something like a
305+
* random number. If you want the service to never be restarted, you could pass through a constant.
306+
*
307+
* @param serviceConfig an object with defining characteristics of the service. It will be reflectively compared to the
308+
* previous configuration.
309+
* @return a builder, for chaining
310+
*/
311+
293312
public OwnedServiceBuilder<T> serviceConfig(Object serviceConfig) {
294313
this.serviceConfig = serviceConfig;
295314
return this;

0 commit comments

Comments
 (0)