Skip to content

Commit eaddc24

Browse files
authored
fix: javadoc problems preventing snapshot release (#1848)
1 parent eace828 commit eaddc24

20 files changed

+73
-7
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/Operator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public Operator(KubernetesClient kubernetesClient) {
4343
}
4444

4545
/**
46+
* @param configurationService implementation
4647
* @deprecated Use {@link #Operator(Consumer)} instead
4748
*/
4849
@Deprecated(forRemoval = true)
@@ -173,6 +174,7 @@ public void stop() throws OperatorException {
173174
*
174175
* @param reconciler the reconciler to register
175176
* @param <P> the {@code CustomResource} type associated with the reconciler
177+
* @return registered controller
176178
* @throws OperatorException if a problem occurred during the registration process
177179
*/
178180
public <P extends HasMetadata> RegisteredController<P> register(Reconciler<P> reconciler)
@@ -192,6 +194,7 @@ public <P extends HasMetadata> RegisteredController<P> register(Reconciler<P> re
192194
* @param reconciler part of the reconciler to register
193195
* @param configuration the configuration with which we want to register the reconciler
194196
* @param <P> the {@code HasMetadata} type associated with the reconciler
197+
* @return registered controller
195198
* @throws OperatorException if a problem occurred during the registration process
196199
*/
197200
public <P extends HasMetadata> RegisteredController<P> register(Reconciler<P> reconciler,
@@ -230,6 +233,7 @@ public <P extends HasMetadata> RegisteredController<P> register(Reconciler<P> re
230233
*
231234
* @param reconciler part of the reconciler to register
232235
* @param configOverrider consumer to use to change config values
236+
* @return registered controller
233237
* @param <P> the {@code HasMetadata} type associated with the reconciler
234238
*/
235239
public <P extends HasMetadata> RegisteredController<P> register(Reconciler<P> reconciler,

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationService.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ default Optional<LeaderElectionConfiguration> getLeaderElectionConfiguration() {
199199
* if false, the startup will ignore recoverable errors, caused for example by RBAC issues, and
200200
* will try to reconnect periodically in the background.
201201
* </p>
202+
*
203+
* @return actual value described above
202204
*/
203205
default boolean stopOnInformerErrorDuringStartup() {
204206
return true;
@@ -208,6 +210,8 @@ default boolean stopOnInformerErrorDuringStartup() {
208210
* Timeout for cache sync. In other words source start timeout. Note that is
209211
* "stopOnInformerErrorDuringStartup" is true the operator will stop on timeout. Default is 2
210212
* minutes.
213+
*
214+
* @return Duration of sync timeout
211215
*/
212216
default Duration cacheSyncTimeout() {
213217
return Duration.ofMinutes(2);
@@ -216,6 +220,8 @@ default Duration cacheSyncTimeout() {
216220
/**
217221
* Handler for an informer stop. Informer stops if there is a non-recoverable error. Like received
218222
* a resource that cannot be deserialized.
223+
*
224+
* @return an optional InformerStopHandler
219225
*/
220226
default Optional<InformerStoppedHandler> getInformerStoppedHandler() {
221227
return Optional.of((informer, ex) -> {

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationServiceOverrider.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ public ResourceClassResolver getResourceClassResolver() {
238238

239239
/**
240240
* @deprecated Use {@link ConfigurationServiceProvider#overrideCurrent(Consumer)} instead
241+
* @param original that will be overriding
242+
* @return current overrider
241243
*/
242244
@Deprecated(since = "2.2.0")
243245
public static ConfigurationServiceOverrider override(ConfigurationService original) {

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ControllerConfigurationOverrider.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ public ControllerConfigurationOverrider<R> watchingAllNamespaces() {
106106
}
107107

108108
/**
109+
* @param retry configuration
110+
* @return current instance of overrider
109111
* @deprecated Use {@link #withRetry(Retry)} instead
110112
*/
111113
@Deprecated(forRemoval = true)

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ResolvedControllerConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ public ResourceEventFilter<P> getEventFilter() {
156156

157157
/**
158158
* @deprecated Use {@link OnAddFilter}, {@link OnUpdateFilter} and {@link GenericFilter} instead
159+
*
160+
* @param eventFilter
159161
*/
160162
@Deprecated(forRemoval = true)
161163
protected void setEventFilter(ResourceEventFilter<P> eventFilter) {

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/informer/InformerConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ public <P extends HasMetadata> PrimaryToSecondaryMapper<P> getPrimaryToSecondary
7878
* {@link io.javaoperatorsdk.operator.RegisteredController}). If true, changing the target
7979
* namespaces of a controller would result to change target namespaces for the
8080
* InformerEventSource.
81+
*
82+
* @return if namespace changes should be followed
8183
*/
8284
boolean followControllerNamespaceChanges();
8385

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/monitoring/Metrics.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ public interface Metrics {
2323

2424
/**
2525
* Do initialization if necessary;
26+
*
27+
* @param controller callback
2628
*/
2729
default void controllerRegistered(Controller<? extends HasMetadata> controller) {}
2830

@@ -36,6 +38,9 @@ default void controllerRegistered(Controller<? extends HasMetadata> controller)
3638
default void receivedEvent(Event event, Map<String, Object> metadata) {}
3739

3840
/**
41+
* @param metadata additional metadata
42+
* @param resourceID of primary resource
43+
* @param retryInfo for current execution
3944
* @deprecated Use {@link #reconcileCustomResource(HasMetadata, RetryInfo, Map)} instead
4045
*/
4146
@Deprecated(forRemoval = true)
@@ -56,6 +61,9 @@ default void reconcileCustomResource(HasMetadata resource, RetryInfo retryInfo,
5661
}
5762

5863
/**
64+
* @param exception actual exception
65+
* @param metadata additional metadata
66+
* @param resourceID of primary resource
5967
* @deprecated Use {@link #failedReconciliation(HasMetadata, Exception, Map)} instead
6068
*/
6169
@Deprecated(forRemoval = true)
@@ -84,7 +92,7 @@ default void reconciliationExecutionFinished(HasMetadata resource,
8492
Map<String, Object> metadata) {}
8593

8694
/**
87-
*
95+
* @param resourceID of primary resource
8896
* @deprecated Use (and implement) {@link #cleanupDoneFor(ResourceID, Map)} instead
8997
*/
9098
@Deprecated
@@ -102,7 +110,7 @@ default void cleanupDoneFor(ResourceID resourceID) {
102110
default void cleanupDoneFor(ResourceID resourceID, Map<String, Object> metadata) {}
103111

104112
/**
105-
*
113+
* @param resourceID of primary resource
106114
* @deprecated Use (and implement) {@link #finishedReconciliation(ResourceID, Map)} instead
107115
*/
108116
@Deprecated
@@ -111,6 +119,8 @@ default void finishedReconciliation(ResourceID resourceID) {
111119
}
112120

113121
/**
122+
* @param resourceID of primary resource
123+
* @param metadata additional metadata
114124
* @deprecated Use {@link #finishedReconciliation(HasMetadata, Map)} instead
115125
*/
116126
@Deprecated(forRemoval = true)

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/ControllerConfiguration.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,22 @@
7575

7676
/**
7777
* Filter of onAdd events of resources.
78+
*
79+
* @return on-add filter
7880
**/
7981
Class<? extends OnAddFilter> onAddFilter() default OnAddFilter.class;
8082

81-
/** Filter of onUpdate events of resources. */
83+
/**
84+
* Filter of onUpdate events of resources.
85+
*
86+
* @return on-update filter
87+
*/
8288
Class<? extends OnUpdateFilter> onUpdateFilter() default OnUpdateFilter.class;
8389

8490
/**
8591
* Filter applied to all operations (add, update, delete). Used to ignore some resources.
92+
*
93+
* @return generic filter
8694
**/
8795
Class<? extends GenericFilter> genericFilter() default GenericFilter.class;
8896

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/Reconciler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ public interface Reconciler<R extends HasMetadata> {
88
* The implementation of this operation is required to be idempotent. Always use the UpdateControl
99
* object to make updates on custom resource if possible.
1010
*
11+
* @throws Exception from the custom implementation
1112
* @param resource the resource that has been created or updated
1213
* @param context the context with which the operation is executed
1314
* @return UpdateControl to manage updates on the custom resource (usually the status) after

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/dependent/EventSourceReferencer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ default void useEventSourceWithName(String name) {}
1010
/**
1111
* Throws {@link EventSourceNotFoundException} an exception if the target event source to use is
1212
* not found.
13+
*
14+
* @param eventSourceRetriever for event sources
1315
*/
1416
void resolveEventSource(EventSourceRetriever<P> eventSourceRetriever)
1517
throws EventSourceNotFoundException;

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/dependent/managed/ManagedDependentResourceContext.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public interface ManagedDependentResourceContext {
3030
* the semantics of this operation is defined as removing the mapping associated with the
3131
* specified key.
3232
*
33+
* @param <T> object type
3334
* @param key the key identifying which contextual object to add or remove from the context
3435
* @param value the value to add to the context or {@code null} to remove an existing entry
3536
* associated with the specified key

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/Controller.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ public void start() throws OperatorException {
309309
* {@link io.javaoperatorsdk.operator.api.config.ControllerConfigurationOverrider#override(ControllerConfiguration)},
310310
* passing it the controller's original configuration.
311311
*
312+
* @param startEventProcessor if event processing should be started automatically
312313
* @throws OperatorException if a problem occurred during the registration process
313314
*/
314315
public synchronized void start(boolean startEventProcessor) throws OperatorException {

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/dependent/AbstractEventSourceHolderDependentResource.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@ public void resolveEventSource(EventSourceRetriever<P> eventSourceRetriever) {
6161
}
6262
}
6363

64-
/** To make this backwards compatible even for respect of overriding */
64+
/**
65+
* To make this backwards compatible even for respect of overriding
66+
*
67+
* @param context for event sources
68+
* @return event source instance
69+
*/
6570
@SuppressWarnings("unchecked")
6671
public T initEventSource(EventSourceContext<P> context) {
6772
return (T) eventSource(context).orElseThrow();

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/dependent/DependentResourceWithExplicitState.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ default Optional<String> eventSourceName() {
3131
*/
3232
Class<S> stateResourceClass();
3333

34-
/** State resource which contains the target state. Usually an ID to address the resource */
34+
/**
35+
* State resource which contains the target state. Usually an ID to address the resource
36+
*
37+
* @param primary resource
38+
* @param resource secondary resource
39+
* @return that stores state
40+
*/
3541
S stateResource(P primary, R resource);
3642

3743
}

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/dependent/kubernetes/GenericKubernetesResourceMatcher.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ public static <R extends HasMetadata> Result<R> match(R desired, R actualResourc
124124
* @param <R> the type of resource we want to determine whether they match or not
125125
* @param <P> the type of primary resources associated with the secondary resources we want to
126126
* match
127+
* @param strongEquality if the resource should match exactly
127128
*/
128129
public static <R extends HasMetadata, P extends HasMetadata> Result<R> match(
129130
KubernetesDependentResource<R, P> dependentResource, R actualResource, P primary,

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/dependent/workflow/WorkflowResult.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public Map<DependentResource, Exception> getErroredDependents() {
2222

2323
/**
2424
* @deprecated Use {@link #erroredDependentsExist()} instead
25+
* @return if any dependents are in error state
2526
*/
2627
@Deprecated(forRemoval = true)
2728
public boolean erroredDependentsExists() {

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/EventSourceManager.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ public <R> List<ResourceEventSource<R, P>> getResourceEventSourcesFor(Class<R> d
222222

223223
/**
224224
* @deprecated Use {@link #getResourceEventSourceFor(Class)} instead
225+
*
226+
* @param <R> target resource type
227+
* @param dependentType target resource class
228+
* @return list of related event sources
225229
*/
226230
@Deprecated
227231
public <R> List<ResourceEventSource<R, P>> getEventSourcesFor(Class<R> dependentType) {

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/rate/RateLimiter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ interface RateLimitState {
1010
}
1111

1212
/**
13+
* @param rateLimitState state implementation
1314
* @return empty if permission acquired or minimal duration until a permission could be acquired
1415
* again
1516
*/

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/PrimaryToSecondaryMapper.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import io.javaoperatorsdk.operator.processing.event.ResourceID;
77

88
/**
9+
* <p>
910
* Identifies the set of secondary resources associated with a given primary resource. This is
1011
* typically needed when multiple secondary resources can be associated with one or several multiple
1112
* primary resources *without* a standard way (e.g. owner reference or annotations) to materialize
@@ -18,16 +19,19 @@
1819
* that this primary resource can properly be reconciled when changes impact the associated
1920
* secondary resources, even though these don't contain any information allowing to make such an
2021
* inference.
21-
* <p/>
22+
* </p>
23+
* <p>
2224
* This helps particularly in cases where several secondary resources, listed in some way in the
2325
* primary resource, need to or can be created before the primary resource exists. In that
2426
* situation, attempting to retrieve the associated secondary resources by calling
2527
* {@link io.javaoperatorsdk.operator.api.reconciler.Context#getSecondaryResource(Class)} would fail
2628
* without providing a mapper to tell JOSDK how to retrieve the secondary resources.
27-
* <p/>
29+
* </p>
30+
* <p>
2831
* You can see an example of this in action in the <a href=
2932
* "https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/primarytosecondary/JobReconciler.java">Reconciler
3033
* for the PrimaryToSecondaryIT</a> integration tests that handles many-to-many relationship.
34+
* </p>
3135
*
3236
* @param <P> primary resource type
3337
*/

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/retry/GenericRetry.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ public static GenericRetry noRetry() {
2121

2222
/**
2323
* @deprecated Use the {@link GradualRetry} annotation instead
24+
*
25+
* @param configuration retry config
26+
* @return Retry instance
2427
*/
2528
@Deprecated(forRemoval = true)
2629
public static Retry fromConfiguration(RetryConfiguration configuration) {

0 commit comments

Comments
 (0)