Package com.twicedb.client.proxy
Class ClientProxy
java.lang.Object
com.twicedb.client.proxy.ClientProxy
A class for proxying network requests from the client to a TwiceDB server(s). Users should not
instantiate this class directly; it should be instantiated automatically by the client.
-
Constructor Summary
ConstructorDescriptionClientProxy
(String serverAddress, ClientConfig clientConfig) ClientProxy
(String zkAddress, String writerAddress, String readerAddress, ClientConfig clientConfig) -
Method Summary
Modifier and TypeMethodDescriptionHealthCheckResponse
checkReader
(HealthCheckRequest req) HealthCheckResponse
checkWriter
(HealthCheckRequest req) protected static ByteBuffer
compressBlobWithCompressor
(Compressor cmprsr, ByteString bytes) read
(ReadRequest req) readEvent
(ReadRequest req) readLsqt()
readObjects
(ReadRequest req) status
(ServerType serverType) void
stop()
<any>
subscribe
(SubscribeRequest sr, Function<SubscribeResponse, Boolean> cback) protected ByteBuffer
uncompressBlob
(ByteString bytes, int expectedUncompressedSize) protected static ByteBuffer
uncompressBlobWithDecompressor
(Decompressor dcmprsr, ByteString bytes, int expectedUncompressedSize) write
(WriteRequest req)
-
Constructor Details
-
ClientProxy
-
ClientProxy
public ClientProxy(String zkAddress, String writerAddress, String readerAddress, ClientConfig clientConfig)
-
-
Method Details
-
getRetryingServiceConfig
-
read
-
readLsqt
-
readEvent
-
uncompressBlobWithDecompressor
protected static ByteBuffer uncompressBlobWithDecompressor(Decompressor dcmprsr, ByteString bytes, int expectedUncompressedSize) -
uncompressBlob
-
readObjects
-
compressBlobWithCompressor
-
write
-
checkReader
public HealthCheckResponse checkReader(HealthCheckRequest req) -
checkWriter
public HealthCheckResponse checkWriter(HealthCheckRequest req) -
stop
public void stop() -
subscribe
-