@Component @Scope(value="singleton") public class TaskExecutionServiceImpl extends java.lang.Object implements TaskExecutionService
TaskExecutionServiceImpl
provides the implementation for TaskExecutionService
that defines
the operations for processing the request and getting the response.
Most of the operation are delegated to TaskExecutionManager
.TaskExecutionServiceImpl
,
TaskExecutionManager
Constructor and Description |
---|
TaskExecutionServiceImpl(TaskExecutionManager taskExecutionManager) |
Modifier and Type | Method and Description |
---|---|
java.util.List<LightningRequestReport> |
getAuditReports(java.lang.String sessionId)
Get the detailed execution reports.
|
SystemStatus |
getLightningStats()
Get the system metrics including CPU, physical and JVM memory.
|
LightningRequestReport |
getReport(java.lang.String sessionId)
Get the detailed execution report for the request.
|
SystemConfig |
getSystemConfig()
Get the system configuration including capacity, retention policy etc
|
LightningResponse |
pollResponse(java.lang.String sessionId,
boolean pollDeltaOnly)
Poll the current execution state for the request submitted by #
TaskExecutionService.submit(LightningRequest) method. |
ReservationReceipt |
reserve(int load)
Check for bandwidth to make reservation for the specified load.
|
void |
submit(LightningRequest request)
Submit a request to get executed asynchronously at high speed.
|
SystemConfig |
updateSystemConfig(SystemConfig sysConfig)
Update the system configuration including capacity, retention policy etc
|
@Autowired public TaskExecutionServiceImpl(TaskExecutionManager taskExecutionManager)
public void submit(LightningRequest request)
TaskExecutionService
ReservationReceipt
returned by the TaskExecutionService.reserve(int)
call.submit
in interface TaskExecutionService
request
- contains the list of Task
and configuration to executepublic LightningResponse pollResponse(java.lang.String sessionId, boolean pollDeltaOnly)
TaskExecutionService
TaskExecutionService.submit(LightningRequest)
method.
This method id helpful to check if the request has completed.pollResponse
in interface TaskExecutionService
sessionId
- the session id of the LightningRequest
pollDeltaOnly
- get full if true
and delta response if false
LightningResponse
that has the current state of task executionpublic ReservationReceipt reserve(int load)
TaskExecutionService
reserve
in interface TaskExecutionService
load
- the load to check for reservationpublic LightningRequestReport getReport(java.lang.String sessionId)
TaskExecutionService
TaskExecutionService.pollResponse(String, boolean)
getReport
in interface TaskExecutionService
sessionId
- the session id of the LightningRequest
LightningRequestReport
that has the detailed execution report of the requestpublic SystemStatus getLightningStats()
TaskExecutionService
getLightningStats
in interface TaskExecutionService
public SystemConfig updateSystemConfig(SystemConfig sysConfig) throws java.lang.Exception
TaskExecutionService
updateSystemConfig
in interface TaskExecutionService
sysConfig
- the system configuration changes to makejava.lang.Exception
- when the update failspublic SystemConfig getSystemConfig()
TaskExecutionService
getSystemConfig
in interface TaskExecutionService
public java.util.List<LightningRequestReport> getAuditReports(java.lang.String sessionId)
TaskExecutionService
getAuditReports
in interface TaskExecutionService
sessionId
- the session id of the requestLightningRequestReport
available in the store