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, rollbackTrxpublic static final int LOCK_TIMEOUT
public CoordinatorStore(boolean selectForUpdate) throws StoreException
StoreExceptionpublic CoordinatorStore(Store store, boolean selectForUpdate) throws StoreException
StoreExceptionpublic void insertCoordinatorJob(CoordinatorJobBean coordinatorJob) throws StoreException
workflow - workflow beanStoreExceptionpublic CoordinatorJobBean getCoordinatorJob(String id, boolean locking) throws StoreException
id - Job IDlocking - Flag for Table LockStoreExceptionpublic List<CoordinatorJobBean> getCoordinatorJobsToBeMaterialized(Date d, int limit) throws StoreException
d - DateStoreExceptionpublic 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 LockStoreExceptionpublic CoordinatorActionBean getCoordinatorAction(String id, boolean locking) throws StoreException
id - action IDStoreExceptionpublic 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, NONEStoreExceptionpublic int getCoordinatorRunningActionsCount(String id) throws StoreException
id - job IDStoreExceptionpublic 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 existJPAExecutorExceptionpublic void updateCoordActionMin(CoordinatorActionBean action) throws StoreException, JPAExecutorException
action - Action BeanStoreException - if action doesn't existJPAExecutorExceptionpublic void updateCoordinatorJob(CoordinatorJobBean job) throws StoreException
jobbean - Coordinator Job BeanStoreException - if action doesn't existpublic void updateCoordinatorJobStatus(CoordinatorJobBean job) throws StoreException
StoreExceptionpublic 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 purgedStoreExceptionpublic void commit() throws StoreException
StoreExceptionpublic void close() throws StoreException
StoreExceptionpublic CoordinatorJobBean getCoordinatorJobs(String id)
public CoordinatorJobInfo getCoordinatorInfo(Map<String,List<String>> filter, int start, int len) throws StoreException
StoreExceptionpublic Integer getActionsForCoordinatorJob(String jobId, boolean locking) throws StoreException
jobId - coordinator job idlocking - true if Actions are to be lockedStoreExceptionpublic 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 returnedStoreExceptionprotected CoordinatorActionBean getBeanForRunningCoordAction(CoordinatorActionBean a)
public CoordinatorActionBean getAction(String id, boolean b)
public List<CoordinatorActionBean> getRunningActionsForCoordinatorJob(String jobId, boolean locking) throws StoreException
StoreExceptionpublic List<CoordinatorActionBean> getRunningActionsOlderThan(long checkAgeSecs, boolean locking) throws StoreException
StoreExceptionpublic List<CoordinatorActionBean> getRecoveryActionsOlderThan(long checkAgeSecs, boolean locking) throws StoreException
StoreExceptionpublic List<CoordinatorActionBean> getCoordActionsForDates(String jobId, Date startDate, Date endDate) throws StoreException
startDate - endDate - StoreExceptionpublic CoordinatorActionBean getCoordActionForNominalTime(String jobId, Date nominalTime) throws StoreException
nominalTime - StoreExceptionpublic List<String> getRecoveryActionsGroupByJobId(long checkAgeSecs) throws StoreException
StoreExceptionCopyright © 2014 Apache Software Foundation. All Rights Reserved.