Class HttpClient5StorageNodeClient
java.lang.Object
com.linkedin.venice.router.httpclient.HttpClient5StorageNodeClient
- All Implemented Interfaces:
StorageNodeClient,Closeable,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionHttpClient5StorageNodeClient(Optional<SSLFactory> sslFactory, VeniceRouterConfig routerConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the client and release all resources held by the clientvoidquery(Instance host, VenicePath path, Consumer<PortableHttpResponse> completedCallBack, Consumer<Throwable> failedCallBack, BooleanSupplier cancelledCallBack) Send a request to storage nodevoidsendRequest(VeniceMetaDataRequest request, CompletableFuture<PortableHttpResponse> responseFuture) voidstart()Start the client and prepare the required resources.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.linkedin.venice.router.httpclient.StorageNodeClient
isInstanceReadyToServe
-
Constructor Details
-
HttpClient5StorageNodeClient
public HttpClient5StorageNodeClient(Optional<SSLFactory> sslFactory, VeniceRouterConfig routerConfig)
-
-
Method Details
-
start
public void start()Description copied from interface:StorageNodeClientStart the client and prepare the required resources.- Specified by:
startin interfaceStorageNodeClient
-
close
public void close()Description copied from interface:StorageNodeClientClose the client and release all resources held by the client- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceStorageNodeClient
-
query
public void query(Instance host, VenicePath path, Consumer<PortableHttpResponse> completedCallBack, Consumer<Throwable> failedCallBack, BooleanSupplier cancelledCallBack) throws RouterException Description copied from interface:StorageNodeClientSend a request to storage node- Specified by:
queryin interfaceStorageNodeClient- Parameters:
host- The target host to which the request will be sentpath- contains information like URI, request content, HTTP method, etc.completedCallBack- Callback function for a complete responsefailedCallBack- if any exception thrown in the channelcancelledCallBack- for requests that are cancelled by the channel- Throws:
RouterException
-
sendRequest
public void sendRequest(VeniceMetaDataRequest request, CompletableFuture<PortableHttpResponse> responseFuture) - Specified by:
sendRequestin interfaceStorageNodeClient
-