@ManagedResource(objectName="Taverna:group=Server-3.1.0,name=Factory", description="The factory for runs.") public abstract class RunFactoryConfiguration extends Object implements ConfigurableRunFactory
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
log |
protected RunDBSupport |
runDB |
protected LocalWorkerState |
state |
Constructor and Description |
---|
RunFactoryConfiguration() |
Modifier and Type | Method and Description |
---|---|
String[] |
getCurrentRunNames()
What are the current runs?
|
int |
getDefaultLifetime()
How long will things live? Getter
|
String |
getExecuteWorkflowScript()
How do we start the workflow engine? Getter
|
String[] |
getExtraArguments()
How do we start the file system access process? Extra arguments to pass.
|
abstract String[] |
getFactoryProcessMapping()
What factory process to use for a particular user?
|
abstract String |
getFactoryProcessName()
What is the RMI ID of the factory process?
|
boolean |
getGenerateProvenance() |
String |
getJavaBinary()
Where is Java? Getter
|
abstract Integer |
getLastExitCode()
What was the last observed exit code?
|
abstract int |
getLastStartupCheckCount()
How long did the last subprocess startup take?
|
int |
getMaxRuns()
How much can be done at once? Getter
|
int |
getOperatingCount()
How many runs are actually operating?
|
int |
getOperatingLimit()
How many runs can be operating at once? Getter
|
String |
getPasswordFile()
Where do we get passwords from? Getter
|
String |
getRegistryHost()
Where is the registry? Getter
|
int |
getRegistryPort()
Where is the registry? Getter
|
String |
getRmiRegistryJar()
How do we start the RMI registry process? Getter
|
String |
getServerForkerJar()
How do we switch users? Getter
|
String |
getServerWorkerJar()
How do we start the file system access process? Getter
|
int |
getSleepTime()
How often do we probe for info? Getter
|
int |
getTotalRuns()
How many runs have there been?
|
int |
getWaitSeconds()
How long do we allow for actions? Getter
|
protected void |
incrementRunCount() |
boolean |
isAllowingRunsToStart()
Check whether the factory is permitting runs to actually start operating.
|
protected abstract int |
operatingCount()
Count the number of operating runs.
|
protected abstract void |
reinitFactory()
Drop any current references to the run factory subprocess and kill it
off.
|
protected abstract void |
reinitRegistry()
Drop any current references to the registry of runs, and kill off that
process.
|
void |
setDefaultLifetime(int defaultLifetime)
Set how long a workflow should live by default.
|
void |
setExecuteWorkflowScript(String executeWorkflowScript)
How do we start the workflow engine? Setter
|
void |
setExtraArguments(String[] extraArguments)
How do we start the file system access process? Extra arguments to pass.
|
void |
setGenerateProvenance(boolean genProv) |
void |
setJavaBinary(String javaBinary)
Where is Java? Setter
|
void |
setMaxRuns(int maxRuns)
How much can be done at once? Setter
|
void |
setOperatingLimit(int operatingLimit)
How many runs can be operating at once? Setter
|
void |
setPasswordFile(String passwordFile)
Where do we get passwords from? Setter
|
void |
setRegistryHost(String host)
Where is the registry? Setter
|
void |
setRegistryPort(int port)
Where is the registry? Setter
|
void |
setRmiRegistryJar(String rmiRegistryJar)
How do we start the RMI registry process? Setter
|
void |
setServerForkerJar(String forkerJarFilename)
How do we switch users? Setter
|
void |
setServerWorkerJar(String serverWorkerJar)
How do we start the file system access process? Setter
|
void |
setSleepTime(int sleepTime)
How often do we probe for info? Setter
|
void |
setWaitSeconds(int seconds)
How long do we allow for actions? Setter
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create
protected org.apache.commons.logging.Log log
protected LocalWorkerState state
protected RunDBSupport runDB
protected abstract void reinitRegistry()
protected abstract void reinitFactory()
protected abstract int operatingCount() throws Exception
Exception
protected final void incrementRunCount()
@ManagedAttribute(description="Whether it is allowed to start a run executing.", currencyTimeLimit=30) public final boolean isAllowingRunsToStart()
RunFactory
isAllowingRunsToStart
in interface RunFactory
@ManagedAttribute(description="The host holding the RMI registry to communicate via.") public final String getRegistryHost()
ConfigurableRunFactory
getRegistryHost
in interface ConfigurableRunFactory
@ManagedAttribute(description="The host holding the RMI registry to communicate via.") public final void setRegistryHost(String host)
ConfigurableRunFactory
setRegistryHost
in interface ConfigurableRunFactory
@ManagedAttribute(description="The port number of the RMI registry. Should not normally be set.") public final int getRegistryPort()
ConfigurableRunFactory
getRegistryPort
in interface ConfigurableRunFactory
@ManagedAttribute(description="The port number of the RMI registry. Should not normally be set.") public final void setRegistryPort(int port)
ConfigurableRunFactory
setRegistryPort
in interface ConfigurableRunFactory
@Nonnull @ManagedAttribute(description="What JAR do we use to start the RMI registry process?") public final String getRmiRegistryJar()
ConfigurableRunFactory
getRmiRegistryJar
in interface ConfigurableRunFactory
@ManagedAttribute(description="What JAR do we use to start the RMI registry process?") public final void setRmiRegistryJar(String rmiRegistryJar)
ConfigurableRunFactory
setRmiRegistryJar
in interface ConfigurableRunFactory
@ManagedAttribute(description="The maximum number of simultaneous runs supported by the server.", currencyTimeLimit=300) public final int getMaxRuns()
ConfigurableRunFactory
getMaxRuns
in interface ConfigurableRunFactory
@ManagedAttribute(description="The maximum number of simultaneous runs supported by the server.", currencyTimeLimit=300) public final void setMaxRuns(int maxRuns)
ConfigurableRunFactory
setMaxRuns
in interface ConfigurableRunFactory
@ManagedAttribute(description="How many minutes should a workflow live by default?", currencyTimeLimit=300) public final int getDefaultLifetime()
ConfigurableRunFactory
getDefaultLifetime
in interface ConfigurableRunFactory
@ManagedAttribute(description="How many minutes should a workflow live by default?", currencyTimeLimit=300) public final void setDefaultLifetime(int defaultLifetime)
setDefaultLifetime
in interface ConfigurableRunFactory
defaultLifetime
- Default lifetime, in minutes.@ManagedAttribute(description="How many milliseconds to wait between checks to see if a worker process has registered.", currencyTimeLimit=300) public final int getSleepTime()
ConfigurableRunFactory
getSleepTime
in interface ConfigurableRunFactory
@ManagedAttribute(description="How many milliseconds to wait between checks to see if a worker process has registered.", currencyTimeLimit=300) public final void setSleepTime(int sleepTime)
ConfigurableRunFactory
setSleepTime
in interface ConfigurableRunFactory
sleepTime
- How many milliseconds to wait between checks to see if a
worker process has registered.@ManagedAttribute(description="How many seconds to wait for a worker process to register itself.", currencyTimeLimit=300) public final int getWaitSeconds()
ConfigurableRunFactory
getWaitSeconds
in interface ConfigurableRunFactory
@ManagedAttribute(description="How many seconds to wait for a worker process to register itself.", currencyTimeLimit=300) public final void setWaitSeconds(int seconds)
ConfigurableRunFactory
setWaitSeconds
in interface ConfigurableRunFactory
seconds
- How many seconds to wait for a worker process to register
itself.@Nonnull @ManagedAttribute(description="The script to run to start running a workflow.", currencyTimeLimit=300) public final String getExecuteWorkflowScript()
ConfigurableRunFactory
getExecuteWorkflowScript
in interface ConfigurableRunFactory
@ManagedAttribute(description="The script to run to start running a workflow.", currencyTimeLimit=300) public final void setExecuteWorkflowScript(String executeWorkflowScript)
ConfigurableRunFactory
setExecuteWorkflowScript
in interface ConfigurableRunFactory
executeWorkflowScript
- The script to run to start running a workflow.@Nonnull @ManagedAttribute(description="The location of the JAR implementing the server worker processes.") public final String getServerWorkerJar()
ConfigurableRunFactory
getServerWorkerJar
in interface ConfigurableRunFactory
@ManagedAttribute(description="The location of the JAR implementing the server worker processes.") public final void setServerWorkerJar(String serverWorkerJar)
ConfigurableRunFactory
setServerWorkerJar
in interface ConfigurableRunFactory
serverWorkerJar
- The location of the JAR implementing the server worker
processes.@Nonnull @ManagedAttribute(description="The list of additional arguments used to make a worker process.", currencyTimeLimit=300) public final String[] getExtraArguments()
ConfigurableRunFactory
getExtraArguments
in interface ConfigurableRunFactory
@ManagedAttribute(description="The list of additional arguments used to make a worker process.", currencyTimeLimit=300) public final void setExtraArguments(@Nonnull String[] extraArguments)
ConfigurableRunFactory
setExtraArguments
in interface ConfigurableRunFactory
extraArguments
- The list of additional arguments used to make a worker
process.@Nonnull @ManagedAttribute(description="Which java executable to run.", currencyTimeLimit=300) public final String getJavaBinary()
ConfigurableRunFactory
getJavaBinary
in interface ConfigurableRunFactory
@ManagedAttribute(description="Which java executable to run.", currencyTimeLimit=300) public final void setJavaBinary(@Nonnull String javaBinary)
ConfigurableRunFactory
setJavaBinary
in interface ConfigurableRunFactory
javaBinary
- Which java executable to run.@Nullable @ManagedAttribute(description="A file containing a password to use when running a program as another user (e.g., with sudo).", currencyTimeLimit=300) public final String getPasswordFile()
ConfigurableRunFactory
getPasswordFile
in interface ConfigurableRunFactory
@ManagedAttribute(description="A file containing a password to use when running a program as another user (e.g., with sudo).", currencyTimeLimit=300) public final void setPasswordFile(@Nullable String passwordFile)
ConfigurableRunFactory
setPasswordFile
in interface ConfigurableRunFactory
passwordFile
- A file containing a password to use when running a program as
another user (e.g., with sudo).@Nonnull @ManagedAttribute(description="The location of the JAR implementing the secure-fork process.", currencyTimeLimit=300) public final String getServerForkerJar()
ConfigurableRunFactory
getServerForkerJar
in interface ConfigurableRunFactory
@ManagedAttribute(description="The location of the JAR implementing the secure-fork process.", currencyTimeLimit=300) public final void setServerForkerJar(String forkerJarFilename)
ConfigurableRunFactory
setServerForkerJar
in interface ConfigurableRunFactory
serverForkerJar
- The location of the JAR implementing the secure-fork process.@ManagedMetric(description="How many times has a workflow run been spawned by this engine.", currencyTimeLimit=10, metricType=COUNTER, category="throughput") public final int getTotalRuns()
ConfigurableRunFactory
getTotalRuns
in interface ConfigurableRunFactory
@ManagedAttribute(description="How many checks were done for the worker process the last time a spawn was tried.", currencyTimeLimit=60) public abstract int getLastStartupCheckCount()
ConfigurableRunFactory
getLastStartupCheckCount
in interface ConfigurableRunFactory
@Nonnull @ManagedAttribute(description="The names of the current runs.", currencyTimeLimit=5) public final String[] getCurrentRunNames()
ConfigurableRunFactory
getCurrentRunNames
in interface ConfigurableRunFactory
@ManagedAttribute(description="What the factory subprocess\'s main RMI interface is registered as.", currencyTimeLimit=60) public abstract String getFactoryProcessName()
ConfigurableRunFactory
getFactoryProcessName
in interface ConfigurableRunFactory
@ManagedAttribute(description="What was the exit code from the last time the factory subprocess was killed?") public abstract Integer getLastExitCode()
ConfigurableRunFactory
getLastExitCode
in interface ConfigurableRunFactory
@ManagedAttribute(description="The mapping of user names to RMI factory IDs.", currencyTimeLimit=60) public abstract String[] getFactoryProcessMapping()
ConfigurableRunFactory
getFactoryProcessMapping
in interface ConfigurableRunFactory
@ManagedAttribute(description="The maximum number of simultaneous operating runs supported by the server.", currencyTimeLimit=300) public final void setOperatingLimit(int operatingLimit)
ConfigurableRunFactory
setOperatingLimit
in interface ConfigurableRunFactory
@ManagedAttribute(description="The maximum number of simultaneous operating runs supported by the server.", currencyTimeLimit=300) public final int getOperatingLimit()
ConfigurableRunFactory
getOperatingLimit
in interface ConfigurableRunFactory
@ManagedMetric(description="How many workflow runs are currently actually executing.", currencyTimeLimit=10, metricType=GAUGE, category="throughput") public final int getOperatingCount() throws Exception
ConfigurableRunFactory
getOperatingCount
in interface ConfigurableRunFactory
Exception
- If anything goes wrong.@ManagedAttribute(description="Whether to tell a workflow to generate provenance bundles by default.") public final void setGenerateProvenance(boolean genProv)
setGenerateProvenance
in interface ConfigurableRunFactory
@ManagedAttribute(description="Whether to tell a workflow to generate provenance bundles by default.") public final boolean getGenerateProvenance()
getGenerateProvenance
in interface ConfigurableRunFactory
Copyright © 2015–2018 The Apache Software Foundation. All rights reserved.