Package org.neo4j.gds.termination
Interface TerminationFlag
- All Known Implementing Classes:
TerminationFlagImpl
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TerminationFlagstatic final intstatic final TerminationFlagstatic final TerminationFlag -
Method Summary
Modifier and TypeMethodDescriptiondefault voidbooleanrunning()default voidstatic TerminationFlagwrap(TerminationMonitor terminationMonitor) Creates a new termination flag.static TerminationFlagwrap(TerminationMonitor terminationMonitor, Supplier<RuntimeException> terminationCause) Creates a new termination flag.
-
Field Details
-
RUNNING_TRUE
-
DEFAULT
-
STOP_RUNNING
-
RUN_CHECK_NODE_COUNT
static final int RUN_CHECK_NODE_COUNT- See Also:
-
-
Method Details
-
wrap
Creates a new termination flag.- Parameters:
terminationMonitor- used to signal that the execution stopped running
-
wrap
static TerminationFlag wrap(TerminationMonitor terminationMonitor, Supplier<RuntimeException> terminationCause) Creates a new termination flag.- Parameters:
terminationMonitor- used to signal that the execution stopped runningterminationCause- returns aRuntimeExceptionthat is thrown when the execution is terminated
-
running
boolean running() -
assertRunning
default void assertRunning()- Throws:
RuntimeException- if the transaction has been terminated
-
terminate
default void terminate()
-