-
Notifications
You must be signed in to change notification settings - Fork 8
perf(entities): optimise AND filter query #193
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.hypertrace.gateway.service.common.config; | ||
|
||
import com.typesafe.config.Config; | ||
import org.hypertrace.gateway.service.entity.config.EntityIdColumnsConfig; | ||
import org.hypertrace.gateway.service.entity.config.LogConfig; | ||
|
||
public class GatewayServiceConfig { | ||
private static final String ENTITY_AND_FILTER_ENABLED_CONFIG_KEY = "filter.entity.and.enabled"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
private final EntityIdColumnsConfig entityIdColumnsConfig; | ||
private final ScopeFilterConfigs scopeFilterConfigs; | ||
private final LogConfig logConfig; | ||
private final boolean isEntityAndFilterEnabled; | ||
|
||
public GatewayServiceConfig(Config config) { | ||
this.entityIdColumnsConfig = EntityIdColumnsConfig.fromConfig(config); | ||
this.scopeFilterConfigs = new ScopeFilterConfigs(config); | ||
this.logConfig = new LogConfig(config); | ||
this.isEntityAndFilterEnabled = | ||
config.hasPath(ENTITY_AND_FILTER_ENABLED_CONFIG_KEY) | ||
? config.getBoolean(ENTITY_AND_FILTER_ENABLED_CONFIG_KEY) | ||
Check warning on line 20 in gateway-service-impl/src/main/java/org/hypertrace/gateway/service/common/config/GatewayServiceConfig.java Codecov / codecov/patchgateway-service-impl/src/main/java/org/hypertrace/gateway/service/common/config/GatewayServiceConfig.java#L20
|
||
: false; | ||
} | ||
|
||
public EntityIdColumnsConfig getEntityIdColumnsConfig() { | ||
return entityIdColumnsConfig; | ||
} | ||
|
||
public ScopeFilterConfigs getScopeFilterConfigs() { | ||
return scopeFilterConfigs; | ||
} | ||
|
||
public LogConfig getLogConfig() { | ||
return logConfig; | ||
Check warning on line 33 in gateway-service-impl/src/main/java/org/hypertrace/gateway/service/common/config/GatewayServiceConfig.java Codecov / codecov/patchgateway-service-impl/src/main/java/org/hypertrace/gateway/service/common/config/GatewayServiceConfig.java#L33
|
||
} | ||
|
||
public boolean isEntityAndFilterEnabled() { | ||
return isEntityAndFilterEnabled; | ||
Check warning on line 37 in gateway-service-impl/src/main/java/org/hypertrace/gateway/service/common/config/GatewayServiceConfig.java Codecov / codecov/patchgateway-service-impl/src/main/java/org/hypertrace/gateway/service/common/config/GatewayServiceConfig.java#L37
|
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic class