diff --git a/core/src/main/java/org/neo4j/gds/core/concurrency/SyncBarrier.java b/core/src/main/java/org/neo4j/gds/core/concurrency/SyncBarrier.java index e8d73e6db2..7946226552 100644 --- a/core/src/main/java/org/neo4j/gds/core/concurrency/SyncBarrier.java +++ b/core/src/main/java/org/neo4j/gds/core/concurrency/SyncBarrier.java @@ -31,11 +31,11 @@ public class SyncBarrier { private final BackoffIdleStrategy idleStrategy; private final Runnable rejectAction; - public static SyncBarrier of() { + public static SyncBarrier create() { return new SyncBarrier(() -> {}); } - public static SyncBarrier of(Runnable rejectAction) { + public static SyncBarrier create(Runnable rejectAction) { return new SyncBarrier(rejectAction); } diff --git a/core/src/test/java/org/neo4j/gds/core/concurrency/SyncBarrierTest.java b/core/src/test/java/org/neo4j/gds/core/concurrency/SyncBarrierTest.java index 83a7e25665..66de8be9af 100644 --- a/core/src/test/java/org/neo4j/gds/core/concurrency/SyncBarrierTest.java +++ b/core/src/test/java/org/neo4j/gds/core/concurrency/SyncBarrierTest.java @@ -26,7 +26,7 @@ class SyncBarrierTest { @Test void shouldSync() { - var barrier = SyncBarrier.of(); + var barrier = SyncBarrier.create(); barrier.startWorker(); barrier.stopWorker();; barrier.sync(); @@ -34,7 +34,7 @@ void shouldSync() { @Test void shouldReject() { - var barrier = SyncBarrier.of(() -> { + var barrier = SyncBarrier.create(() -> { throw new IllegalStateException(); }); barrier.sync();