Package net.sf.basedb.core
Class Job.JobSignalTransporter
java.lang.Object
net.sf.basedb.core.Job.JobSignalTransporter
- All Implemented Interfaces:
SignalTransporter
- Enclosing class:
- Job
private class Job.JobSignalTransporter extends Object implements SignalTransporter
Wrapper for the signal transporter that intercepts the ABORT signal
and changes the job's status to ABORTING. The ABORT signal is dealyed
until after a successful commit.
- Since:
- 2.6
-
Field Summary
Fields Modifier and Type Field Description private Signal
delayed
private SignalTransporter
transporter
-
Constructor Summary
Constructors Modifier Constructor Description private
JobSignalTransporter(SignalTransporter transporter)
-
Method Summary
Modifier and Type Method Description Collection<Signal>
getSupportedSignals()
Get a collection containing the signals supported, by the signal handler.void
init(String params)
Initialise the signal transporter.(package private) void
onAfterCommit()
void
send(Signal signal)
Send a signal.
-
Field Details
-
transporter
-
delayed
-
-
Constructor Details
-
JobSignalTransporter
-
-
Method Details
-
getSupportedSignals
Description copied from interface:SignalTransporter
Get a collection containing the signals supported, by the signal handler. A null return value means that the transporter just doesn't know about which signals are supported and which are not.- Specified by:
getSupportedSignals
in interfaceSignalTransporter
- Returns:
- A collections with the signals, or null
-
init
Description copied from interface:SignalTransporter
Initialise the signal transporter. The parameter is the same as returned bySignalReceiver.registerSignalHandler(SignalHandler)
and should contain information that the transporter can parse and use for contacting the correct signal receiver and to send signals to the registered signal handler.- Specified by:
init
in interfaceSignalTransporter
- Parameters:
params
- The initialisation string
-
send
Description copied from interface:SignalTransporter
Send a signal.- Specified by:
send
in interfaceSignalTransporter
- Parameters:
signal
- The signal to send, must not be null
-
onAfterCommit
void onAfterCommit()
-