public interface ProcessManager
Modifier and Type | Method and Description |
---|---|
void |
dropProcess()
Remove the process from the list of currently active processes on this server.
|
void |
endProcess()
Finish a process when the async thread of execution is complete.
|
Map<Long,ProcessStatus> |
getProcesses()
Return the list of currently active processes on this server.
|
void |
pauseProcess()
Remove the process from the list of currently active processes on this server and set the state to true
for isPaused in the database.
|
void |
setExecution(Long executionId,
String executionType)
Set the information that associates a specific async thread of execution with a ProcessStatus instance.
|
void |
setProgress(long count,
long total)
|
void |
startProcess(String name,
String friendlyName,
String description)
Add a new arbitrary ProcessStatus to the list of currently active processes on this server.
|
void |
startProcess(String name,
String friendlyName,
String description,
Boolean isPaused)
Add a new arbitrary ProcessStatus to the list of currently active processes on this server.
|
void |
startProcess(String name,
String friendlyName,
String description,
String executionType,
Long executionId)
Add a new arbitrary ProcessStatus to the list of currently active processes on this server.
|
void |
startProcess(String name,
String friendlyName,
String description,
String executionType,
Long executionId,
Boolean isPaused)
Add a new arbitrary ProcessStatus to the list of currently active processes on this server.
|
void |
startProcess(SystemEvent event)
Add a new ProcessStatus to the list of currently active processes on this server.
|
boolean |
supportsResume(Long processId)
Detects if a ProcessStatus can be resumed.
|
void |
unPauseProcess(Long processId)
Sets the isPaused state to false for the ProcessStatus.
|
void startProcess(SystemEvent event)
DatabaseSystemEventNodeImpl
when consuming an event.event
- void startProcess(String name, String friendlyName, String description)
name
- friendlyName
- description
- void startProcess(String name, String friendlyName, String description, Boolean isPaused)
name
- friendlyName
- description
- isPaused
- void startProcess(String name, String friendlyName, String description, String executionType, Long executionId)
name
- friendlyName
- description
- executionType
- executionId
- void startProcess(String name, String friendlyName, String description, String executionType, Long executionId, Boolean isPaused)
name
- friendlyName
- description
- executionType
- executionId
- isPaused
- void endProcess()
void pauseProcess()
ProcessStatus.getLastUpdated()
is no longer updated. Note, this does nothing to actually stop the async thread of execution. Paused processes
are not eligible for abandoned process handling until the unPauseProcess(Long)
method is called.void dropProcess()
ProcessStatus.getLastUpdated()
is no longer updated.
Note, this does nothing to actually stop the async thread of execution. Dropped processes
are eligible for abandoned process handling after their age threshold expiration.Map<Long,ProcessStatus> getProcesses()
ProcessStatus.getProcessId()
.void unPauseProcess(Long processId)
HandleAbandonedProcessEvent
listener for this ProcessStatus.getExecutionType()
will cause the
resumption of execution.processId
- boolean supportsResume(Long processId)
HandleAbandonedProcessEvent
that supports
the ProcessStatus.getExecutionType()
implement the
HandleAbandonedProcessEventListener
interface.processId
- void setProgress(long count, long total)
count
- total
- void setExecution(Long executionId, String executionType)
executionId
- an identifying long id (e.g. the primary key from an entity used in the async thread of execution)executionType
- an identifying tyep value (e.g. the class name from an entity used in the async thread of execution)Copyright © 2019. All rights reserved.