Skip to content

Commit

Permalink
chore: work in progress
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Klick <[email protected]>
  • Loading branch information
nathanklick committed Sep 14, 2023
1 parent 3fe7a1f commit 118dea3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
public class NodeActiveReadinessCheck implements ReadinessCheck {

@Override
public boolean ready() {
public boolean ready(final Deployment deployment) {
return true;
}
}
1 change: 1 addition & 0 deletions fullstack-examples/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@

requires com.hedera.fullstack.readiness.api;
requires com.hedera.fullstack.monitoring.api;
requires com.hedera.fullstack.test.toolkit;
requires com.hedera.fullstack.validator.api;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ default Duration checkInterval() {
return DEFAULT_CHECK_INTERVAL;
}

default boolean appliesTo(Node<?> node) {
return node instanceof ApplicationNode;
default boolean appliesTo(Class<? extends Node<?>> nodeClass) {
return ApplicationNode.class.isAssignableFrom(nodeClass);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.hedera.fullstack.readiness.api;

import com.hedera.fullstack.test.toolkit.api.model.infrastructure.ApplicationNode;
import com.hedera.fullstack.test.toolkit.api.model.infrastructure.Deployment;
import com.hedera.fullstack.test.toolkit.api.model.infrastructure.Node;
import java.time.Duration;

Expand All @@ -25,7 +26,7 @@ public interface ReadinessCheck {
Duration DEFAULT_CHECK_INTERVAL = Duration.ofSeconds(1);
Duration DEFAULT_CHECK_TIMEOUT = Duration.ofSeconds(60);

boolean ready();
boolean ready(Deployment deployment);

default Duration checkInterval() {
return DEFAULT_CHECK_INTERVAL;
Expand All @@ -35,7 +36,7 @@ default Duration checkTimeout() {
return DEFAULT_CHECK_TIMEOUT;
}

default boolean appliesTo(Node<?> node) {
return node instanceof ApplicationNode;
default boolean appliesTo(Class<? extends Node<?>> nodeClass) {
return ApplicationNode.class.isAssignableFrom(nodeClass);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
*/
@FunctionalInterface
public interface Validator {

default boolean appliesTo(Node<?> node) {
return node instanceof ApplicationNode;
default boolean appliesTo(Class<? extends Node<?>> nodeClass) {
return ApplicationNode.class.isAssignableFrom(nodeClass);
}

/**
Expand Down

0 comments on commit 118dea3

Please sign in to comment.