public interface ProcessDao
Modifier and Type | Method and Description |
---|---|
ProcessStatus |
archive(ProcessStatus processStatus) |
Boolean |
containsRecentlyActiveByExecutionType(int thresholdSeconds,
String executionType)
Determine if there are currently any active ProcessStatus instances with the given executionType,
or if there are any "recently" archived ProcessStatus instances of the given type.
|
void |
delete(ProcessStatus processStatus) |
List<ProcessStatus> |
findAbandonedProcesses(int thresholdSeconds)
Find the list of ProcessStatus instances whose
ProcessStatus.getLastUpdated()
time is older than the current database time subtracting the threshold. |
ProcessStatus |
findByExecution(Long executionId,
String executionType)
Find a ProcessStatus instance based on information tied to the async process associated.
|
List<ProcessStatus> |
findOldArchivedProcesses(int thresholdSeconds)
Find any processes that are archived and older than the current time - threshold.
|
List<Long> |
getAllPersistedProcessIds()
Retrieve all the processIds for all ProcessStatus instances
|
void |
keepAlive(List<Long> processIds)
Update the
ProcessStatus.getLastUpdated() field
to the current time of the database server. |
ProcessStatus |
loadByProcessId(Long processId) |
void |
refresh(ProcessStatus processStatus) |
ProcessStatus |
save(ProcessStatus processStatus) |
ProcessStatus |
unArchive(ProcessStatus processStatus) |
ProcessStatus save(ProcessStatus processStatus)
void refresh(ProcessStatus processStatus)
void keepAlive(List<Long> processIds)
ProcessStatus.getLastUpdated()
field
to the current time of the database server.processIds
- void delete(ProcessStatus processStatus)
ProcessStatus archive(ProcessStatus processStatus)
ProcessStatus unArchive(ProcessStatus processStatus)
List<Long> getAllPersistedProcessIds()
ProcessStatus loadByProcessId(Long processId)
List<ProcessStatus> findAbandonedProcesses(int thresholdSeconds)
ProcessStatus.getLastUpdated()
time is older than the current database time subtracting the threshold.thresholdSeconds
- List<ProcessStatus> findOldArchivedProcesses(int thresholdSeconds)
thresholdSeconds
- ProcessStatus findByExecution(Long executionId, String executionType)
executionId
- an identifying long id (e.g. the primary key from an entity used in the async process)executionType
- an identifying tyep value (e.g. the class name from an entity used in the async process)Boolean containsRecentlyActiveByExecutionType(int thresholdSeconds, String executionType)
thresholdSeconds
- The number of seconds in the past used to check for ProcessStatus last updated. Any status
older than this threshold is not considered.executionType
- an identifying type value (e.g. the class name from an entity used in the async process)Copyright © 2019. All rights reserved.