public static class LightningClient.LightningClientImpl extends Object implements LightningClient
LightningClientImpl is the one and only implementation of LightningClient as of version 1.0
This class is package protected to discourage direct instantiation. LightningClientBuild should be used to instantiate LightningClientLightningClient.LightningClientImpl| Constructor and Description |
|---|
LightningClientImpl(LightningClientConfig config,
ServiceHostResolver resolver,
ServiceCaller caller) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addResponseCallback(com.ebay.lightning.core.beans.LightningRequest request,
LightningResponseCallback callback,
long timeoutInMillis)
Register callback for request.
|
com.ebay.lightning.core.store.LightningRequestReport |
getAuditJsonReport(String sessionId,
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(String sessionId,
String servingHostIp)
Get the detailed execution report for the request in compressed format.
|
List<com.ebay.lightning.core.store.LightningRequestReport> |
getAuditSummary(String servingHostIp,
String sessionId)
Get all detailed execution report in compressed format.
|
LightningClientConfig |
getConfig()
Get the lighting client configuration.
|
com.ebay.lightning.core.beans.SystemStatus |
getLightningStats(String servingHostIp)
Get the lighting statistics.
|
com.ebay.lightning.core.config.SystemConfig |
getSystemConfig(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(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(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(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(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(String servingHostIp,
com.ebay.lightning.core.config.SystemConfig config)
Update system configuration parameters.
|
public LightningClientImpl(LightningClientConfig config, ServiceHostResolver resolver, ServiceCaller caller)
public com.ebay.lightning.core.beans.LightningRequest submit(List<com.ebay.lightning.core.beans.Task> tasks)
LightningClientsubmit in interface LightningClienttasks - list of Task to be executed asynchronouslyLightningRequest that contain sessionId, ReservationReceipt etcpublic com.ebay.lightning.core.beans.LightningRequest submit(List<com.ebay.lightning.core.beans.Task> tasks, com.ebay.lightning.core.config.RequestConfig requestconfig)
LightningClientsubmit in interface LightningClienttasks - list of Task to be executed asynchronouslyrequestconfig - configuration parameters to execute the taskLightningRequest that contain sessionId, ReservationReceipt etcpublic com.ebay.lightning.core.beans.LightningResponse pollResponse(com.ebay.lightning.core.beans.LightningRequest req,
boolean pollDeltaOnly)
LightningClientpollResponse in interface LightningClientreq - the LightningRequest object returned by LightningClient.submit(List) methodpollDeltaOnly - get full or delta responseLightningResponse that has the current state of task executionpublic void submitWithCallback(List<com.ebay.lightning.core.beans.Task> tasks, LightningResponseCallback callback, long timeoutInMillis)
LightningClientsubmitWithCallback in interface LightningClienttasks - list of Task to be executed asynchronouslycallback - LightningResponseCallback to invoke on completion of request or timeout.timeoutInMillis - timeout for callbackpublic void submitWithCallback(List<com.ebay.lightning.core.beans.Task> tasks, com.ebay.lightning.core.config.RequestConfig requestconfig, LightningResponseCallback callback, long timeoutInMillis)
LightningClientsubmitWithCallback in interface LightningClienttasks - 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 callbackprotected void addResponseCallback(com.ebay.lightning.core.beans.LightningRequest request,
LightningResponseCallback callback,
long timeoutInMillis)
request - the LightningRequest object returned by submit(List) methodcallback - LightningResponseCallback to invoke on completion of request or timeout.timeoutInMillis - timeout for callbackpublic com.ebay.lightning.core.store.LightningRequestReport getAuditReport(com.ebay.lightning.core.beans.LightningRequest req)
LightningClientLightningClient.pollResponse(LightningRequest, boolean) method.getAuditReport in interface LightningClientreq - the LightningRequest object returned by LightningClient.submit(List) methodLightningRequestReport that has the detailed execution reportpublic com.ebay.lightning.core.store.LightningRequestReport getAuditReport(String sessionId, String servingHostIp)
LightningClientLightningClient.pollResponse(LightningRequest, boolean) method.getAuditReport in interface LightningClientsessionId - the sessionId from LightningRequestservingHostIp - the lightning core host that executed the task with the specific sessionIdLightningRequestReport that has the detailed execution report in compressed formatpublic com.ebay.lightning.core.store.LightningRequestReport getAuditJsonReport(String sessionId, String servingHostIp)
LightningClientLightningClient.pollResponse(LightningRequest, boolean) method.getAuditJsonReport in interface LightningClientsessionId - the sessionId from LightningRequestservingHostIp - the lightning core host that executed the task with the specific sessionIdLightningRequestReport that has the detailed execution report in JSON formatpublic List<com.ebay.lightning.core.store.LightningRequestReport> getAuditSummary(String servingHostIp, String sessionId)
LightningClientgetAuditSummary in interface LightningClientservingHostIp - the lightning core host for which audit summary need to be fetchedsessionId - the sessionId from LightningRequestLightningRequestReport that has the all detailed execution report in compressed formatpublic com.ebay.lightning.core.config.SystemConfig updateSystemConfig(String servingHostIp, com.ebay.lightning.core.config.SystemConfig config)
LightningClientupdateSystemConfig in interface LightningClientservingHostIp - the lightning core instance that has to be updatedconfig - the new SystemConfig parametersSystemConfig instance after updatepublic com.ebay.lightning.core.config.SystemConfig getSystemConfig(String servingHostIp)
LightningClientgetSystemConfig in interface LightningClientservingHostIp - the lightning core instance for which the parameters has to be fetchedSystemConfig instance of the host represented by servingHostIppublic com.ebay.lightning.core.beans.SystemStatus getLightningStats(String servingHostIp)
LightningClientgetLightningStats in interface LightningClientservingHostIp - the lightning core instance for which lightning statistics has to be fetchedSystemStatus instance of the host represented by servingHostIppublic LightningClientConfig getConfig()
LightningClientgetConfig in interface LightningClientLightningClientConfigCopyright © 2017. All rights reserved.