Class HttpClient5StorageNodeClient
- java.lang.Object
-
- com.linkedin.venice.router.httpclient.HttpClient5StorageNodeClient
-
- All Implemented Interfaces:
StorageNodeClient
,java.io.Closeable
,java.lang.AutoCloseable
public class HttpClient5StorageNodeClient extends java.lang.Object implements StorageNodeClient
-
-
Constructor Summary
Constructors Constructor Description HttpClient5StorageNodeClient(java.util.Optional<SSLFactory> sslFactory, VeniceRouterConfig routerConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close the client and release all resources held by the clientvoid
query(Instance host, VenicePath path, java.util.function.Consumer<PortableHttpResponse> completedCallBack, java.util.function.Consumer<java.lang.Throwable> failedCallBack, java.util.function.BooleanSupplier cancelledCallBack)
Send a request to storage nodevoid
sendRequest(VeniceMetaDataRequest request, java.util.concurrent.CompletableFuture<PortableHttpResponse> responseFuture)
void
start()
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, wait
-
Methods inherited from interface com.linkedin.venice.router.httpclient.StorageNodeClient
isInstanceReadyToServe
-
-
-
-
Constructor Detail
-
HttpClient5StorageNodeClient
public HttpClient5StorageNodeClient(java.util.Optional<SSLFactory> sslFactory, VeniceRouterConfig routerConfig)
-
-
Method Detail
-
start
public void start()
Description copied from interface:StorageNodeClient
Start the client and prepare the required resources.- Specified by:
start
in interfaceStorageNodeClient
-
close
public void close()
Description copied from interface:StorageNodeClient
Close the client and release all resources held by the client- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfaceStorageNodeClient
-
query
public void query(Instance host, VenicePath path, java.util.function.Consumer<PortableHttpResponse> completedCallBack, java.util.function.Consumer<java.lang.Throwable> failedCallBack, java.util.function.BooleanSupplier cancelledCallBack) throws RouterException
Description copied from interface:StorageNodeClient
Send a request to storage node- Specified by:
query
in 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, java.util.concurrent.CompletableFuture<PortableHttpResponse> responseFuture)
- Specified by:
sendRequest
in interfaceStorageNodeClient
-
-