public interface LightningClient
LightningClient
provides the interface for users to submit requests, poll response, see audit data etc to/from lightning core.
Additionally, the interface provides functionality to read and update configuration at runtime.LightningClient.LightningClientImpl
Modifier and Type | Interface and Description |
---|---|
static class |
LightningClient.LightningClientImpl
LightningClientImpl is the one and only implementation of LightningClient as of version 1.0
This class is package protected to discourage direct instantiation. |
Modifier and Type | Method and Description |
---|---|
com.ebay.lightning.core.store.LightningRequestReport |
getAuditJsonReport(java.lang.String sessionId,
java.lang.String servingHostIp)
Get the detailed execution report for the request in JSON format.
|
com.ebay.lightning.core.store.LightningRequestReport |
getAuditReport(com.ebay.lightning.core.beans.LightningRequest req)
Get the detailed execution report for the request in compressed format.
|
com.ebay.lightning.core.store.LightningRequestReport |
getAuditReport(java.lang.String sessionId,
java.lang.String servingHostIp)
Get the detailed execution report for the request in compressed format.
|
java.util.List<com.ebay.lightning.core.store.LightningRequestReport> |
getAuditSummary(java.lang.String servingHostIp,
java.lang.String sessionId)
Get all detailed execution report in compressed format.
|
LightningClientConfig |
getConfig()
Get the lighting client configuration.
|
com.ebay.lightning.core.beans.SystemStatus |
getLightningStats(java.lang.String servingHostIp)
Get the lighting statistics.
|
com.ebay.lightning.core.config.SystemConfig |
getSystemConfig(java.lang.String servingHostIp)
Get the system configuration parameters.
|
com.ebay.lightning.core.beans.LightningResponse |
pollResponse(com.ebay.lightning.core.beans.LightningRequest req,
boolean pollDeltaOnly)
Poll the current result for request.
|
com.ebay.lightning.core.beans.LightningRequest |
submit(java.util.List<com.ebay.lightning.core.beans.Task> tasks)
Submit a list of tasks to be executed asynchronously at high speed.
|
com.ebay.lightning.core.beans.LightningRequest |
submit(java.util.List<com.ebay.lightning.core.beans.Task> tasks,
com.ebay.lightning.core.config.RequestConfig requestconfig)
Submit a list of tasks to be executed asynchronously and configuration parameters.
|
void |
submitWithCallback(java.util.List<com.ebay.lightning.core.beans.Task> tasks,
LightningResponseCallback callback,
long timeoutInMillis)
Submit a list of tasks to be executed asynchronously at high speed.
|
void |
submitWithCallback(java.util.List<com.ebay.lightning.core.beans.Task> tasks,
com.ebay.lightning.core.config.RequestConfig requestconfig,
LightningResponseCallback callback,
long timeoutInMillis)
Submit a list of tasks to be executed asynchronously and configuration parameters.
|
com.ebay.lightning.core.config.SystemConfig |
updateSystemConfig(java.lang.String servingHostIp,
com.ebay.lightning.core.config.SystemConfig config)
Update system configuration parameters.
|
com.ebay.lightning.core.beans.LightningRequest submit(java.util.List<com.ebay.lightning.core.beans.Task> tasks)
tasks
- list of Task
to be executed asynchronouslyLightningRequest
that contain sessionId
, ReservationReceipt
etccom.ebay.lightning.core.beans.LightningRequest submit(java.util.List<com.ebay.lightning.core.beans.Task> tasks, com.ebay.lightning.core.config.RequestConfig requestconfig)
tasks
- list of Task
to be executed asynchronouslyrequestconfig
- configuration parameters to execute the taskLightningRequest
that contain sessionId
, ReservationReceipt
etcvoid submitWithCallback(java.util.List<com.ebay.lightning.core.beans.Task> tasks, LightningResponseCallback callback, long timeoutInMillis)
tasks
- list of Task
to be executed asynchronouslycallback
- LightningResponseCallback
to invoke on completion of request or timeout.timeoutInMillis
- timeout for callbackvoid submitWithCallback(java.util.List<com.ebay.lightning.core.beans.Task> tasks, com.ebay.lightning.core.config.RequestConfig requestconfig, LightningResponseCallback callback, long timeoutInMillis)
tasks
- list of Task
to be executed asynchronouslyrequestconfig
- configuration parameters to execute the taskcallback
- LightningResponseCallback
to invoke on completion of request or timeout.timeoutInMillis
- timeout for callbackcom.ebay.lightning.core.beans.LightningResponse pollResponse(com.ebay.lightning.core.beans.LightningRequest req, boolean pollDeltaOnly)
req
- the LightningRequest
object returned by submit(List)
methodpollDeltaOnly
- get full or delta responseLightningResponse
that has the current state of task executioncom.ebay.lightning.core.store.LightningRequestReport getAuditReport(com.ebay.lightning.core.beans.LightningRequest req)
pollResponse(LightningRequest, boolean)
method.req
- the LightningRequest
object returned by submit(List)
methodLightningRequestReport
that has the detailed execution reportcom.ebay.lightning.core.store.LightningRequestReport getAuditReport(java.lang.String sessionId, java.lang.String servingHostIp)
pollResponse(LightningRequest, boolean)
method.sessionId
- the sessionId
from LightningRequest
servingHostIp
- the lightning core host that executed the task with the specific sessionId
LightningRequestReport
that has the detailed execution report in compressed formatcom.ebay.lightning.core.store.LightningRequestReport getAuditJsonReport(java.lang.String sessionId, java.lang.String servingHostIp)
pollResponse(LightningRequest, boolean)
method.sessionId
- the sessionId
from LightningRequest
servingHostIp
- the lightning core host that executed the task with the specific sessionId
LightningRequestReport
that has the detailed execution report in JSON formatjava.util.List<com.ebay.lightning.core.store.LightningRequestReport> getAuditSummary(java.lang.String servingHostIp, java.lang.String sessionId)
sessionId
- the sessionId
from LightningRequest
servingHostIp
- the lightning core host for which audit summary need to be fetchedLightningRequestReport
that has the all detailed execution report in compressed formatcom.ebay.lightning.core.config.SystemConfig updateSystemConfig(java.lang.String servingHostIp, com.ebay.lightning.core.config.SystemConfig config)
servingHostIp
- the lightning core instance that has to be updatedconfig
- the new SystemConfig
parametersSystemConfig
instance after updatecom.ebay.lightning.core.config.SystemConfig getSystemConfig(java.lang.String servingHostIp)
servingHostIp
- the lightning core instance for which the parameters has to be fetchedSystemConfig
instance of the host represented by servingHostIp
com.ebay.lightning.core.beans.SystemStatus getLightningStats(java.lang.String servingHostIp)
servingHostIp
- the lightning core instance for which lightning statistics has to be fetchedSystemStatus
instance of the host represented by servingHostIp
LightningClientConfig getConfig()
LightningClientConfig