Skip to content

fix: remove map attribute holder #981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import io.javaoperatorsdk.operator.api.config.ConfigurationService;
import io.javaoperatorsdk.operator.api.reconciler.dependent.ManagedDependentResourceContext;

public interface Context extends AttributeHolder {
public interface Context {

Optional<RetryInfo> getRetryInfo();

Expand All @@ -15,13 +15,6 @@ default <T> Optional<T> getSecondaryResource(Class<T> expectedType) {

<T> Optional<T> getSecondaryResource(Class<T> expectedType, String eventSourceName);

@Override
default <T> T getMandatory(Object key, Class<T> expectedType) {
return get(key, expectedType).orElseThrow(() -> new IllegalStateException(
"Mandatory attribute (key: " + key + ", type: " + expectedType.getName()
+ ") is missing or not of the expected type"));
}

ConfigurationService getConfigurationService();

ManagedDependentResourceContext managedDependentResourceContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import io.javaoperatorsdk.operator.api.reconciler.dependent.ManagedDependentResourceContext;
import io.javaoperatorsdk.operator.processing.Controller;

public class DefaultContext<P extends HasMetadata> extends MapAttributeHolder implements Context {
public class DefaultContext<P extends HasMetadata> implements Context {

private final RetryInfo retryInfo;
private final Controller<P> controller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* @param <P> the type associated with the primary resource that is handled by your reconciler
*/
public class EventSourceContext<P extends HasMetadata> extends MapAttributeHolder {
public class EventSourceContext<P extends HasMetadata> {

private final ResourceCache<P> primaryCache;
private final ConfigurationService configurationService;
Expand Down

This file was deleted.