@ManagedResource(objectName="Taverna:group=Server-3.1.0,name=RunFactory", description="The factory for simple singleton forked run.") public class ForkRunFactory extends AbstractRemoteRunFactory implements ConfigurableRunFactory
SECURITY_POLICY_FILE
log, runDB, state
Constructor and Description |
---|
ForkRunFactory()
Create a factory for remote runs that works by forking off a subprocess.
|
Modifier and Type | Method and Description |
---|---|
String[] |
getFactoryProcessMapping()
What factory process to use for a particular user?
|
String |
getFactoryProcessName()
What is the RMI ID of the factory process?
|
Integer |
getLastExitCode()
What was the last observed exit code?
|
int |
getLastStartupCheckCount()
How long did the last subprocess startup take?
|
protected RemoteSingleRun |
getRealRun(UsernamePrincipal creator,
Workflow workflow,
UUID id)
Gets the RMI connector for a new run.
|
void |
initFactory()
Makes the subprocess that manufactures runs.
|
protected void |
initRegistry() |
void |
killFactory()
Destroys the subprocess that manufactures runs.
|
protected int |
operatingCount()
Count the number of operating runs.
|
protected void |
reinitFactory()
Drop any current references to the run factory subprocess and kill it
off.
|
create, getMasterEventFeed, getSupportedListenerTypes, getTheRegistry, initInteractionDetails, launchSubprocess, makeListener, makeURReciver, reinitRegistry, serializeWorkflow
getCurrentRunNames, getDefaultLifetime, getExecuteWorkflowScript, getExtraArguments, getGenerateProvenance, getJavaBinary, getMaxRuns, getOperatingCount, getOperatingLimit, getPasswordFile, getRegistryHost, getRegistryPort, getRmiRegistryJar, getServerForkerJar, getServerWorkerJar, getSleepTime, getTotalRuns, getWaitSeconds, incrementRunCount, isAllowingRunsToStart, setDefaultLifetime, setExecuteWorkflowScript, setExtraArguments, setGenerateProvenance, setJavaBinary, setMaxRuns, setOperatingLimit, setPasswordFile, setRegistryHost, setRegistryPort, setRmiRegistryJar, setServerForkerJar, setServerWorkerJar, setSleepTime, setWaitSeconds
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCurrentRunNames, getDefaultLifetime, getExecuteWorkflowScript, getExtraArguments, getGenerateProvenance, getJavaBinary, getMaxRuns, getOperatingCount, getOperatingLimit, getPasswordFile, getRegistryHost, getRegistryPort, getRmiRegistryJar, getServerForkerJar, getServerWorkerJar, getSleepTime, getTotalRuns, getWaitSeconds, setDefaultLifetime, setExecuteWorkflowScript, setExtraArguments, setGenerateProvenance, setJavaBinary, setMaxRuns, setOperatingLimit, setPasswordFile, setRegistryHost, setRegistryPort, setRmiRegistryJar, setServerForkerJar, setServerWorkerJar, setSleepTime, setWaitSeconds
create, isAllowingRunsToStart
isAllowingRunsToStart
public ForkRunFactory() throws JAXBException
JAXBException
- Shouldn't happen.@PostConstruct protected void initRegistry()
protected void reinitFactory()
RunFactoryConfiguration
reinitFactory
in class RunFactoryConfiguration
@ManagedAttribute(description="How many checks were done for the worker process the last time a spawn was tried.", currencyTimeLimit=60) public int getLastStartupCheckCount()
ConfigurableRunFactory
getLastStartupCheckCount
in interface ConfigurableRunFactory
getLastStartupCheckCount
in class RunFactoryConfiguration
@ManagedAttribute(description="What was the exit code from the last time the factory subprocess was killed?") public Integer getLastExitCode()
ConfigurableRunFactory
getLastExitCode
in interface ConfigurableRunFactory
getLastExitCode
in class RunFactoryConfiguration
@ManagedAttribute(description="What the factory subprocess\'s main RMI interface is registered as.", currencyTimeLimit=60) public String getFactoryProcessName()
ConfigurableRunFactory
getFactoryProcessName
in interface ConfigurableRunFactory
getFactoryProcessName
in class RunFactoryConfiguration
public void initFactory() throws Exception
Exception
- If anything goes wrong.@PreDestroy public void killFactory()
protected RemoteSingleRun getRealRun(UsernamePrincipal creator, Workflow workflow, UUID id) throws Exception
AbstractRemoteRunFactory
getRealRun
in class AbstractRemoteRunFactory
creator
- Who is creating the workflow run.workflow
- What workflow are they instantiating.id
- The identity token for the run, newly minted.Exception
- Just about anything can go wrong...public String[] getFactoryProcessMapping()
ConfigurableRunFactory
getFactoryProcessMapping
in interface ConfigurableRunFactory
getFactoryProcessMapping
in class RunFactoryConfiguration
protected int operatingCount() throws Exception
RunFactoryConfiguration
operatingCount
in class RunFactoryConfiguration
Exception
Copyright © 2015–2018 The Apache Software Foundation. All rights reserved.