org.apache.oozie.service
Class WorkflowStoreService

java.lang.Object
  extended by org.apache.oozie.service.WorkflowStoreService
All Implemented Interfaces:
Service
Direct Known Subclasses:
LiteWorkflowStoreService

public abstract class WorkflowStoreService
extends Object
implements Service

Base service for persistency of jobs and actions.


Field Summary
static String TRANSIENT_VAR_PREFIX
           
static String WORKFLOW_BEAN
           
 
Fields inherited from interface org.apache.oozie.service.Service
CONF_PREFIX, DEFAULT_LOCK_TIMEOUT, lockTimeout, USE_XCOMMAND
 
Constructor Summary
WorkflowStoreService()
           
 
Method Summary
abstract  WorkflowStore create()
          Return a workflow store instance with a fresh transaction.
<S extends Store>
WorkflowStore
create(S store)
          Return a workflow store instance with an existing transaction.
static List<String> getActionsToFail(WorkflowInstance instance)
          Return the list of action IDs to fail.
static List<String> getActionsToKill(WorkflowInstance instance)
          Return the list of action IDs to kill.
 Class<? extends Service> getInterface()
          Return the public interface of the service.
static List<WorkflowActionBean> getStartedActions(WorkflowInstance instance)
          Return the list of actions started by a signal in an instance.
abstract  WorkflowLib getWorkflowLibWithNoDB()
          Return a workkflow lib, giving access to the parser functionality.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.oozie.service.Service
destroy, init
 

Field Detail

TRANSIENT_VAR_PREFIX

public static final String TRANSIENT_VAR_PREFIX
See Also:
Constant Field Values

WORKFLOW_BEAN

public static final String WORKFLOW_BEAN
See Also:
Constant Field Values
Constructor Detail

WorkflowStoreService

public WorkflowStoreService()
Method Detail

getInterface

public Class<? extends Service> getInterface()
Return the public interface of the service.

Specified by:
getInterface in interface Service
Returns:
WorkflowStoreService.

getWorkflowLibWithNoDB

public abstract WorkflowLib getWorkflowLibWithNoDB()
Return a workkflow lib, giving access to the parser functionality.

Returns:
a workflow lib to use the parser.

create

public abstract WorkflowStore create()
                              throws StoreException
Return a workflow store instance with a fresh transaction.

The workflow store has to be committed and then closed to commit changes, if only close it rolls back.

Returns:
a workflow store.
Throws:
StoreException - thrown if the workflow store could not be created.

create

public <S extends Store> WorkflowStore create(S store)
                     throws StoreException
Return a workflow store instance with an existing transaction.

The workflow store has to be committed and then closed to commit changes, if only close it rolls back.

Returns:
a workflow store.
Throws:
StoreException - thrown if the workflow store could not be created.

getStartedActions

public static List<WorkflowActionBean> getStartedActions(WorkflowInstance instance)
Return the list of actions started by a signal in an instance.

Parameters:
instance - workflow instance that has been signaled.
Returns:
the list of actions started by the signaling.

getActionsToKill

public static List<String> getActionsToKill(WorkflowInstance instance)
Return the list of action IDs to kill.

Parameters:
instance - workflow instance
Returns:
the list of action IDs to kill.

getActionsToFail

public static List<String> getActionsToFail(WorkflowInstance instance)
Return the list of action IDs to fail.

Parameters:
instance - workflow instance
Returns:
the list of action IDs to fail.


Copyright © 2013 Apache Software Foundation. All Rights Reserved.