Class D2TransportClient
java.lang.Object
com.linkedin.venice.client.store.transport.TransportClient
com.linkedin.venice.client.store.transport.D2TransportClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
D2Client
based TransportClient implementation.-
Field Summary
Fields inherited from class com.linkedin.venice.client.store.transport.TransportClient
HTTPS
-
Constructor Summary
ConstructorDescriptionD2TransportClient
(String d2ServiceName, com.linkedin.d2.balancer.D2Client d2Client) Construct by an existing D2Client (such as from the pegasus-d2-client-default-cmpt).D2TransportClient
(String d2ServiceName, ClientConfig clientConfig) Construct by customized zookeeper and other configs. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
com.linkedin.d2.balancer.D2Client
void
setServiceName
(String serviceName) void
streamPost
(String requestPath, Map<String, String> headers, byte[] requestBody, TransportClientStreamingCallback callback, int keyCount) toString()
Methods inherited from class com.linkedin.venice.client.store.transport.TransportClient
get, getCopyIfNotUsableInCallback, post
-
Constructor Details
-
D2TransportClient
Construct by an existing D2Client (such as from the pegasus-d2-client-default-cmpt).- Parameters:
d2ServiceName
-d2Client
-
-
D2TransportClient
Construct by customized zookeeper and other configs.- Parameters:
d2ServiceName
-clientConfig
-
-
-
Method Details
-
getServiceName
-
setServiceName
-
get
public CompletableFuture<TransportClientResponse> get(String requestPath, Map<String, String> headers) - Specified by:
get
in classTransportClient
-
post
public CompletableFuture<TransportClientResponse> post(String requestPath, Map<String, String> headers, byte[] requestBody) - Specified by:
post
in classTransportClient
-
streamPost
public void streamPost(String requestPath, Map<String, String> headers, byte[] requestBody, TransportClientStreamingCallback callback, int keyCount) - Specified by:
streamPost
in classTransportClient
-
close
public void close() -
getD2Client
public com.linkedin.d2.balancer.D2Client getD2Client() -
toString
-