public class ServiceHostResolver extends Object
ServiceHostResolver manages the seeds aka lightning core instances. The list of seeds to be managed
are passed to the constructor via {link LightningClientConfig}. The LightningClient routes the
tasks to the seed returned by ServiceHostResolver.LightningClientConfig,
RestAPICaller| Constructor and Description |
|---|
ServiceHostResolver(LightningClientConfig config,
ServiceCaller apiCaller)
Constructs a new
ServiceHostResolver object with seed management configuration |
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize() |
AbstractMap.SimpleEntry<com.ebay.lightning.core.beans.ReservationReceipt,String> |
getNextEndPoint(int forLoad)
Get the next available seed that can handle the task.
|
public ServiceHostResolver(LightningClientConfig config, ServiceCaller apiCaller)
ServiceHostResolver object with seed management configurationconfig - LightningClientConfig contains the seeds and configuration for seed managementapiCaller - ServiceCaller makes calls to seed to check if it can process a request of specific loadpublic AbstractMap.SimpleEntry<com.ebay.lightning.core.beans.ReservationReceipt,String> getNextEndPoint(int forLoad)
forLoad - the load of the task to be executed by the seedCopyright © 2017. All rights reserved.