Package net.sf.basedb.opengrid.service
Class OpenGridSignalHandlerFactory
java.lang.Object
net.sf.basedb.opengrid.service.OpenGridSignalHandlerFactory
- All Implemented Interfaces:
ActionFactory<SignalHandler>
public class OpenGridSignalHandlerFactory extends Object implements ActionFactory<SignalHandler>
Signal handler implementation for Open Grid Scheduler clusters.
Jobs that are started on a cluster should be registered in BASE
with an external id equal to the job id on the cluster,
ExtensionSignalTransporter
as the signal transporter implementation
and the URI from getSignalUri(JobIdentifier)
as the
signal transporter parameter.
Signal URI:s have the form:
ogx://cluster-id/?ABORT,STATUS#job-id
where cluster-id is the username, ip-address and port of the cluster.-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
OpenGridSignalHandlerFactory.OpenGridSignalHandler
Signal handler implementation. -
Field Summary
Fields Modifier and Type Field Description static String
ID
The ID of the signal handler extension.private static ExtensionsLogger
logger
static Collection<Signal>
SUPPORTED_SIGNALS
All supported signals by this signal handler. -
Constructor Summary
Constructors Constructor Description OpenGridSignalHandlerFactory()
-
Method Summary
Modifier and Type Method Description SignalHandler[]
getActions(InvokationContext<? super SignalHandler> context)
static String
getSignalUri(JobIdentifier jobId)
Generate a signal URI that is used to send signals to a given job on a cluster.boolean
prepareContext(InvokationContext<? super SignalHandler> context)
If the signal schema is "ogx" this factory should handle it.
-
Field Details
-
ID
The ID of the signal handler extension.- Since:
- 1.10
- See Also:
- Constant Field Values
-
SUPPORTED_SIGNALS
All supported signals by this signal handler. -
logger
-
-
Constructor Details
-
OpenGridSignalHandlerFactory
public OpenGridSignalHandlerFactory()
-
-
Method Details
-
getSignalUri
Generate a signal URI that is used to send signals to a given job on a cluster.- Parameters:
jobId
- The job identifier
-
prepareContext
If the signal schema is "ogx" this factory should handle it.- Specified by:
prepareContext
in interfaceActionFactory<SignalHandler>
-
getActions
- Specified by:
getActions
in interfaceActionFactory<SignalHandler>
-