-
- All Known Subinterfaces:
BDDHandler,DnnfCompilationHandler,FactorizationHandler,MaxSATHandler,ModelEnumerationHandler,OptimizationHandler,SATHandler
- All Known Implementing Classes:
CNFEncoder.AdvancedFactorizationHandler,ComputationHandler,NumberOfModelsHandler,NumberOfNodesBDDHandler,TimeoutBDDHandler,TimeoutHandler,TimeoutMaxSATHandler,TimeoutModelEnumerationHandler,TimeoutOptimizationHandler,TimeoutSATHandler
public interface HandlerInterface for a handler. A handler can be used as callback for different time-intensive computations in order to abort these computations. There are same often used default handlers already implemented and users can implement their own handlers by implementing the respective interfaces.- Since:
- 1.6.2
- Version:
- 2.1.0
-
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default booleanaborted()Returns whether the computation was aborted by the handler.static booleanaborted(Handler handler)Returnstrueif the handler is notnulland is already aborted.static voidstart(Handler handler)Null-safe helper method to start a handler.default voidstarted()This method is called when the computation starts.
-
-
-
Method Detail
-
aborted
default boolean aborted()
Returns whether the computation was aborted by the handler.- Returns:
trueif the computation was aborted by the handler, otherwisefalse
-
started
default void started()
This method is called when the computation starts.
-
aborted
static boolean aborted(Handler handler)
Returnstrueif the handler is notnulland is already aborted.- Parameters:
handler- the handler to check- Returns:
trueif the handler is notnulland is already aborted, otherwisefalse
-
start
static void start(Handler handler)
Null-safe helper method to start a handler.- Parameters:
handler- the handler to start, may benull
-
-