diff --git a/applications/operations/src/main/java/org/neo4j/gds/applications/operations/FeatureTogglesRepository.java b/applications/operations/src/main/java/org/neo4j/gds/applications/operations/FeatureTogglesRepository.java index 9e0824cdfa..66a8b8bcf1 100644 --- a/applications/operations/src/main/java/org/neo4j/gds/applications/operations/FeatureTogglesRepository.java +++ b/applications/operations/src/main/java/org/neo4j/gds/applications/operations/FeatureTogglesRepository.java @@ -30,6 +30,10 @@ * Let's encapsulate feature toggles and eventually make them not a global singleton. */ public class FeatureTogglesRepository { + void enableAdjacencyCompressionMemoryTracking(boolean value) { + GdsFeatureToggles.ENABLE_ADJACENCY_COMPRESSION_MEMORY_TRACKING.toggle(value); + } + void enableArrowDatabaseImport(boolean value) { GdsFeatureToggles.ENABLE_ARROW_DATABASE_IMPORT.toggle(value); } diff --git a/applications/operations/src/main/java/org/neo4j/gds/applications/operations/OperationsApplications.java b/applications/operations/src/main/java/org/neo4j/gds/applications/operations/OperationsApplications.java index 77a56d22c3..b999cd9578 100644 --- a/applications/operations/src/main/java/org/neo4j/gds/applications/operations/OperationsApplications.java +++ b/applications/operations/src/main/java/org/neo4j/gds/applications/operations/OperationsApplications.java @@ -47,6 +47,10 @@ public static OperationsApplications create( return new OperationsApplications(featureTogglesRepository, requestScopedDependencies); } + public void enableAdjacencyCompressionMemoryTracking(boolean value) { + featureTogglesRepository.enableAdjacencyCompressionMemoryTracking(value); + } + public void enableArrowDatabaseImport(boolean value) { featureTogglesRepository.enableArrowDatabaseImport(value); } diff --git a/proc/misc/src/main/java/org/neo4j/gds/FeatureToggleProc.java b/proc/misc/src/main/java/org/neo4j/gds/FeatureToggleProc.java index d489d21256..ff673757ee 100644 --- a/proc/misc/src/main/java/org/neo4j/gds/FeatureToggleProc.java +++ b/proc/misc/src/main/java/org/neo4j/gds/FeatureToggleProc.java @@ -48,6 +48,13 @@ public void adjacencyPackingStrategy(@Name(value = "adjacencyPackingStrategy") S facade.operations().setAdjacencyPackingStrategy(adjacencyPackingStrategy); } + @Internal + @Procedure("gds.features.enableAdjacencyCompressionMemoryTracking") + @Description("Enables memory tracking during the construction of an adjacency list.") + public void enableAdjacencyCompressionMemoryTracking(@Name(value = "enableAdjacencyCompressionMemoryTracking") boolean enableAdjacencyCompressionMemoryTracking) { + facade.operations().enableAdjacencyCompressionMemoryTracking(enableAdjacencyCompressionMemoryTracking); + } + @Internal @Procedure("gds.features.enableArrowDatabaseImport") @Description("Enables support for importing Neo4j databases via the GDS Arrow Flight Server.") @@ -139,13 +146,6 @@ public void useUncompressedAdjacencyList(@Name(value = "useUncompressedAdjacency facade.operations().setUseUncompressedAdjacencyList(useUncompressedAdjacencyList); } - @Internal - @Procedure("gds.features.enableAdjacencyCompressionMemoryTracking") - @Description("Enables memory tracking during the construction of an adjacency list.") - public void enableAdjacencyCompressionMemoryTracking(@Name(value = "enableAdjacencyCompressionMemoryTracking") boolean enableAdjacencyCompressionMemoryTracking) { - GdsFeatureToggles.ENABLE_ADJACENCY_COMPRESSION_MEMORY_TRACKING.toggle(enableAdjacencyCompressionMemoryTracking); - } - @Internal @Procedure("gds.features.enableAdjacencyCompressionMemoryTracking.reset") @Description("Sets the default behaviour for enabling memory tracking during the construction of an adjacency list. That value is returned.") diff --git a/procedures/operations-facade/src/main/java/org/neo4j/gds/procedures/operations/OperationsProcedureFacade.java b/procedures/operations-facade/src/main/java/org/neo4j/gds/procedures/operations/OperationsProcedureFacade.java index a72ad50d11..6e24be77bd 100644 --- a/procedures/operations-facade/src/main/java/org/neo4j/gds/procedures/operations/OperationsProcedureFacade.java +++ b/procedures/operations-facade/src/main/java/org/neo4j/gds/procedures/operations/OperationsProcedureFacade.java @@ -32,6 +32,10 @@ public OperationsProcedureFacade(ApplicationsFacade applicationsFacade) { this.applicationsFacade = applicationsFacade; } + public void enableAdjacencyCompressionMemoryTracking(boolean value) { + applicationsFacade.operations().enableAdjacencyCompressionMemoryTracking(value); + } + public void enableArrowDatabaseImport(boolean value) { applicationsFacade.operations().enableArrowDatabaseImport(value); }