WorkflowProgramController(ProgramRunId programRunId, WorkflowDriver driver) { super(programRunId); this.driver = driver; this.serviceName = getServiceName(); startListen(driver); }
/** * Creates instance which will be used to initialize, run, and destroy the custom action. * @param customActionContext an instance of context * @param instantiator to instantiates the custom action class * @param classLoader used to load the custom action class * @throws Exception when failed to instantiate the custom action */ CustomActionExecutor(BasicCustomActionContext customActionContext, InstantiatorFactory instantiator, ClassLoader classLoader) throws Exception { this.customActionContext = customActionContext; this.customAction = createCustomAction(customActionContext, instantiator, classLoader); }
/** * Returns all {@link Scope#USER} tokens set by the current node. */ public synchronized Map<String, Value> getAllFromCurrentNode() { return getAllFromNode(nodeName); }
@Override public WorkflowToken getWorkflowToken() { return workflowProgramInfo.getWorkflowToken(); }
/** * Make a deep copy of the {@link WorkflowToken}. * @return copied WorkflowToken */ public synchronized WorkflowToken deepCopy() { return new BasicWorkflowToken(this); }
@Override public synchronized void put(String key, Value value) { put(key, value, Scope.USER); }
@Override public synchronized Value get(String key) { return get(key, Scope.USER); }
@Override protected void doSuspend() throws Exception { driver.suspend(); }
@Override protected void doResume() throws Exception { driver.resume(); }
@Override public synchronized Map<String, List<NodeValue>> getAll() { return getAll(Scope.USER); }
@Override protected void doStop() throws Exception { driver.stopAndWait(); }
@Override public WorkflowToken getWorkflowToken() { return workflowProgramInfo.getWorkflowToken(); }
WorkflowProgramController(ProgramRunId programRunId, WorkflowDriver driver) { super(programRunId); this.driver = driver; this.serviceName = getServiceName(); startListen(driver); }
/** * Make a deep copy of the {@link WorkflowToken}. * @return copied WorkflowToken */ public synchronized WorkflowToken deepCopy() { return new BasicWorkflowToken(this); }
@Override public synchronized void put(String key, Value value) { put(key, value, Scope.USER); }
@Override public synchronized Value get(String key) { return get(key, Scope.USER); }
/** * Creates instance which will be used to initialize, run, and destroy the custom action. * @param customActionContext an instance of context * @param instantiator to instantiates the custom action class * @param classLoader used to load the custom action class * @throws Exception when failed to instantiate the custom action */ CustomActionExecutor(BasicCustomActionContext customActionContext, InstantiatorFactory instantiator, ClassLoader classLoader) throws Exception { this.customActionContext = customActionContext; this.customAction = createCustomAction(customActionContext, instantiator, classLoader); }
/** * Returns all {@link Scope#USER} tokens set by the current node. */ public synchronized Map<String, Value> getAllFromCurrentNode() { return getAllFromNode(nodeName); }
@Override protected void doSuspend() throws Exception { driver.suspend(); }
@Override public synchronized Value get(String key, String nodeName) { return get(key, nodeName, Scope.USER); }