Skip to content
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

Adding support for Expression Resolver #143

Merged
merged 12 commits into from
Jan 25, 2023
Prev Previous commit
Next Next commit
Updating Expression Config
  • Loading branch information
ankitk-me committed Jan 10, 2023
commit aef5553debce190a1928c045e1925567116bab5c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class EngineConfiguration extends Configuration
public static final LongPropertyDef ENGINE_CREDITOR_CHILD_CLEANUP_LINGER_MILLIS;
public static final BooleanPropertyDef ENGINE_VERBOSE;
public static final IntPropertyDef ENGINE_WORKERS;
public static final BooleanPropertyDef ENGINE_CONFIG_SYNTAX_MUSTACHE;
public static final BooleanPropertyDef ENGINE_CONFIG_SYNTAX_EXPRESSIONS;

private static final ConfigurationDef ENGINE_CONFIG;

Expand Down Expand Up @@ -99,7 +99,7 @@ public class EngineConfiguration extends Configuration
ENGINE_CREDITOR_CHILD_CLEANUP_LINGER_MILLIS = config.property("child.cleanup.linger", SECONDS.toMillis(5L));
ENGINE_VERBOSE = config.property("verbose", false);
ENGINE_WORKERS = config.property("workers", Runtime.getRuntime().availableProcessors());
ENGINE_CONFIG_SYNTAX_MUSTACHE = config.property("config.resolve.expressions", true);
ENGINE_CONFIG_SYNTAX_EXPRESSIONS = config.property("config.resolve.expressions", true);
ENGINE_CONFIG = config;
}

Expand Down Expand Up @@ -268,9 +268,9 @@ public int workers()
return ENGINE_WORKERS.getAsInt(this);
}

public boolean configSyntaxMustache()
public boolean configSyntaxExpressions()
{
return ENGINE_CONFIG_SYNTAX_MUSTACHE.getAsBoolean(this);
return ENGINE_CONFIG_SYNTAX_EXPRESSIONS.getAsBoolean(this);
}

public Function<String, InetAddress[]> hostResolver()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ else if ("http".equals(configURL.getProtocol()) || "https".equals(configURL.getP
}
}

if (config.configSyntaxMustache())
if (config.configSyntaxExpressions())
{
configText = ExpressionResolver.instantiate().resolve(configText);
}
Expand Down