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