Package net.sf.basedb.opengrid.service
Class OpenGridSignalHandlerFactory
java.lang.Object
net.sf.basedb.opengrid.service.OpenGridSignalHandlerFactory
- All Implemented Interfaces:
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
Modifier and TypeClassDescription(package private) static class
Signal handler implementation. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The ID of the signal handler extension.private static final ExtensionsLogger
static final Collection<Signal>
All supported signals by this signal handler. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetActions
(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:
-
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>
-