Class IrqHandler
java.lang.Object
org.apache.hadoop.service.launcher.IrqHandler
- All Implemented Interfaces:
SignalUtil.Handler
Handler of interrupts that relays them to a registered
implementation of
IrqHandler.Interrupted.
This class bundles up all the compiler warnings about abuse of sun.misc
interrupt handling code into one place.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInterrupt data to pass on.static interfaceCallback issues on an interrupt. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIrqHandler(String name, IrqHandler.Interrupted handler) Create an IRQ handler bound to the specific interrupt. -
Method Summary
-
Field Details
-
CONTROL_C
Definition of the Control-C handler name: "INT".- See Also:
-
SIGTERM
Definition of defaultkillsignal: "TERM".- See Also:
-
-
Constructor Details
-
IrqHandler
Create an IRQ handler bound to the specific interrupt.- Parameters:
name- signal namehandler- handler
-
-
Method Details
-
bind
public void bind()Bind to the interrupt handler.- Throws:
IllegalArgumentException- if the exception could not be set
-
getName
- Returns:
- the signal name.
-
raise
public void raise()Raise the signal. -
toString
-
handle
Handler for the JVM API for signal handling.- Specified by:
handlein interfaceSignalUtil.Handler- Parameters:
s- signal raised
-
getSignalCount
public int getSignalCount()Get the count of how many times a signal has been raised.- Returns:
- the count of signals
-