public final class EtcdWatchClient extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closed |
protected GrpcClient.ResilientResponseObserver<WatchRequest,WatchResponse> |
responseObserver |
| Constructor and Description |
|---|
EtcdWatchClient(GrpcClient client) |
EtcdWatchClient(GrpcClient client,
Executor executor) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
closeRequestStreamIfNoWatches() |
protected io.grpc.stub.StreamObserver<WatchRequest> |
getRequestStream()
get current watch request stream if exists, otherwise establish new one
|
protected void |
processResponse(WatchResponse wr) |
protected void |
sendCancel(long watchId) |
KvClient.WatchIterator |
watch(WatchCreateRequest createReq)
Blocking watch
|
KvClient.Watch |
watch(WatchCreateRequest createReq,
io.grpc.stub.StreamObserver<WatchUpdate> observer) |
KvClient.Watch |
watch(WatchCreateRequest createReq,
io.grpc.stub.StreamObserver<WatchUpdate> observer,
Executor executor) |
protected final GrpcClient.ResilientResponseObserver<WatchRequest,WatchResponse> responseObserver
protected boolean closed
public EtcdWatchClient(GrpcClient client)
public EtcdWatchClient(GrpcClient client, Executor executor)
public KvClient.Watch watch(WatchCreateRequest createReq, io.grpc.stub.StreamObserver<WatchUpdate> observer)
public KvClient.Watch watch(WatchCreateRequest createReq, io.grpc.stub.StreamObserver<WatchUpdate> observer, Executor executor)
public KvClient.WatchIterator watch(WatchCreateRequest createReq)
protected void sendCancel(long watchId)
protected io.grpc.stub.StreamObserver<WatchRequest> getRequestStream()
protected void closeRequestStreamIfNoWatches()
protected void processResponse(WatchResponse wr)
public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2022. All rights reserved.