Package net.sf.basedb.core.signal
Interface InterruptHandler
-
- All Known Implementing Classes:
EnhancedThreadSignalHandler
,ExceptionInterruptHandler
public interface InterruptHandler
An interface for handling thread interrupts. A handler is responsible for taking some kind of action when a thread has been interrupted viaThread.interrupt()
. Handlers are registered withThreadSignalHandler.setInterruptHandler(InterruptHandler)
and are invoked fromThreadSignalHandler.checkInterrupted()
when the currently running thread has been interrupted.Note to BASE developers! Long running operations inside the BASE core or utilities should call
ThreadSignalHandler.checkInterrupted()
at regular intervals to make sure that operations can be interrupted.- Since:
- 2.16
- Author:
- Nicklas
- Last modified
- $Date: 2010-09-10 13:09:05 +0200 (fr, 10 sep 2010) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
handleInterrupt()
This method is called when the worker thread has been interrupted by some other thread.
-