public class CoordinatorStore extends Store
Modifier and Type | Field and Description |
---|---|
static int |
LOCK_TIMEOUT |
Constructor and Description |
---|
CoordinatorStore(boolean selectForUpdate) |
CoordinatorStore(Store store,
boolean selectForUpdate) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
commit() |
CoordinatorActionBean |
getAction(String id,
boolean b) |
Integer |
getActionsForCoordinatorJob(String jobId,
boolean locking)
Loads all actions for the given Coordinator job.
|
List<CoordinatorActionBean> |
getActionsSubsetForCoordinatorJob(String jobId,
int start,
int len)
Loads given number of actions for the given Coordinator job.
|
protected CoordinatorActionBean |
getBeanForRunningCoordAction(CoordinatorActionBean a) |
CoordinatorActionBean |
getCoordActionForNominalTime(String jobId,
Date nominalTime)
Get coordinator action bean for given date
|
List<CoordinatorActionBean> |
getCoordActionsForDates(String jobId,
Date startDate,
Date endDate)
Get coordinator action beans for given start date and end date
|
CoordinatorActionBean |
getCoordinatorAction(String id,
boolean locking)
Load the CoordinatorAction into a Bean and return it.
|
List<CoordinatorActionBean> |
getCoordinatorActionsForJob(String id,
int numResults,
String executionOrder)
Return CoordinatorActions for a jobID.
|
CoordinatorJobInfo |
getCoordinatorInfo(Map<String,List<String>> filter,
int start,
int len) |
CoordinatorJobBean |
getCoordinatorJob(String id,
boolean locking)
Load the CoordinatorJob into a Bean and return it.
|
CoordinatorJobBean |
getCoordinatorJobs(String id) |
List<CoordinatorJobBean> |
getCoordinatorJobsOlderThanStatus(long checkAgeSecs,
String status,
int limit,
boolean locking)
A list of Coordinator Jobs that are matched with the status and have last materialized time' older than
checkAgeSecs will be returned.
|
List<CoordinatorJobBean> |
getCoordinatorJobsToBeMaterialized(Date d,
int limit)
Get a list of Coordinator Jobs that should be materialized.
|
int |
getCoordinatorRunningActionsCount(String id)
Return CoordinatorActions for a jobID.
|
List<String> |
getRecoveryActionsGroupByJobId(long checkAgeSecs) |
List<CoordinatorActionBean> |
getRecoveryActionsOlderThan(long checkAgeSecs,
boolean locking) |
List<CoordinatorActionBean> |
getRunningActionsForCoordinatorJob(String jobId,
boolean locking) |
List<CoordinatorActionBean> |
getRunningActionsOlderThan(long checkAgeSecs,
boolean locking) |
void |
insertCoordinatorAction(CoordinatorActionBean action)
Create a new Action record in the ACTIONS table with the given Bean.
|
void |
insertCoordinatorJob(CoordinatorJobBean coordinatorJob)
Create a CoordJobBean.
|
void |
purge(long olderThanDays,
int limit)
Purge the coordinators completed older than given days.
|
void |
updateCoordActionMin(CoordinatorActionBean action)
Update the given action bean to DB.
|
void |
updateCoordinatorAction(CoordinatorActionBean action)
Update the given action bean to DB.
|
void |
updateCoordinatorJob(CoordinatorJobBean job)
Update the given coordinator job bean to DB.
|
void |
updateCoordinatorJobStatus(CoordinatorJobBean job) |
beginTrx, closeTrx, commitTrx, contains, getConnection, getEntityManager, getFlushMode, isActive, isClosed, isDetached, rollbackTrx
public static final int LOCK_TIMEOUT
public CoordinatorStore(boolean selectForUpdate) throws StoreException
StoreException
public CoordinatorStore(Store store, boolean selectForUpdate) throws StoreException
StoreException
public void insertCoordinatorJob(CoordinatorJobBean coordinatorJob) throws StoreException
workflow
- workflow beanStoreException
public CoordinatorJobBean getCoordinatorJob(String id, boolean locking) throws StoreException
id
- Job IDlocking
- Flag for Table LockStoreException
public List<CoordinatorJobBean> getCoordinatorJobsToBeMaterialized(Date d, int limit) throws StoreException
d
- DateStoreException
public List<CoordinatorJobBean> getCoordinatorJobsOlderThanStatus(long checkAgeSecs, String status, int limit, boolean locking) throws StoreException
checkAgeSecs
- Job age in Secondsstatus
- Coordinator Job Statuslimit
- Number of results to returnlocking
- Flag for Table LockStoreException
public CoordinatorActionBean getCoordinatorAction(String id, boolean locking) throws StoreException
id
- action IDStoreException
public List<CoordinatorActionBean> getCoordinatorActionsForJob(String id, int numResults, String executionOrder) throws StoreException
id
- job IDnumResults
- number of results to returnexecutionOrder
- execution for this job - FIFO, LIFO, LAST_ONLY, NONEStoreException
public int getCoordinatorRunningActionsCount(String id) throws StoreException
id
- job IDStoreException
public void insertCoordinatorAction(CoordinatorActionBean action) throws StoreException
action
- WorkflowActionBeanStoreException
- If the action is already presentpublic void updateCoordinatorAction(CoordinatorActionBean action) throws StoreException, JPAExecutorException
action
- Action BeanStoreException
- if action doesn't existJPAExecutorException
public void updateCoordActionMin(CoordinatorActionBean action) throws StoreException, JPAExecutorException
action
- Action BeanStoreException
- if action doesn't existJPAExecutorException
public void updateCoordinatorJob(CoordinatorJobBean job) throws StoreException
jobbean
- Coordinator Job BeanStoreException
- if action doesn't existpublic void updateCoordinatorJobStatus(CoordinatorJobBean job) throws StoreException
StoreException
public void purge(long olderThanDays, int limit) throws StoreException
olderThanDays
- number of days for which to preserve the coordinatorslimit
- maximum number of coordinator jobs to be purgedStoreException
public void commit() throws StoreException
StoreException
public void close() throws StoreException
StoreException
public CoordinatorJobBean getCoordinatorJobs(String id)
public CoordinatorJobInfo getCoordinatorInfo(Map<String,List<String>> filter, int start, int len) throws StoreException
StoreException
public Integer getActionsForCoordinatorJob(String jobId, boolean locking) throws StoreException
jobId
- coordinator job idlocking
- true if Actions are to be lockedStoreException
public List<CoordinatorActionBean> getActionsSubsetForCoordinatorJob(String jobId, int start, int len) throws StoreException
jobId
- coordinator job idstart
- offset for select statementlen
- number of Workflow Actions to be returnedStoreException
protected CoordinatorActionBean getBeanForRunningCoordAction(CoordinatorActionBean a)
public CoordinatorActionBean getAction(String id, boolean b)
public List<CoordinatorActionBean> getRunningActionsForCoordinatorJob(String jobId, boolean locking) throws StoreException
StoreException
public List<CoordinatorActionBean> getRunningActionsOlderThan(long checkAgeSecs, boolean locking) throws StoreException
StoreException
public List<CoordinatorActionBean> getRecoveryActionsOlderThan(long checkAgeSecs, boolean locking) throws StoreException
StoreException
public List<CoordinatorActionBean> getCoordActionsForDates(String jobId, Date startDate, Date endDate) throws StoreException
startDate
- endDate
- StoreException
public CoordinatorActionBean getCoordActionForNominalTime(String jobId, Date nominalTime) throws StoreException
nominalTime
- StoreException
public List<String> getRecoveryActionsGroupByJobId(long checkAgeSecs) throws StoreException
StoreException
Copyright © 2014 Apache Software Foundation. All Rights Reserved.