KvClient.FluentCmpTarget, KvClient.FluentDeleteRequest, KvClient.FluentPutRequest, KvClient.FluentRangeRequest, KvClient.FluentRequest<FR extends KvClient.FluentRequest<FR,ReqT,RespT>,ReqT,RespT>, KvClient.FluentTxnOps<FTO extends KvClient.FluentTxnOps<FTO>>, KvClient.FluentTxnRequest, KvClient.FluentTxnSuccOps, KvClient.FluentWatchRequest, KvClient.RetryStrategy, KvClient.Watch, KvClient.WatchIterator| Modifier and Type | Field and Description |
|---|---|
protected GrpcClient |
client |
| Constructor and Description |
|---|
EtcdKvClient(GrpcClient client) |
| Modifier and Type | Method and Description |
|---|---|
KvClient.FluentTxnOps<?> |
batch()
Start a fluent batch transaction request
|
void |
close() |
com.google.common.util.concurrent.ListenableFuture<CompactionResponse> |
compact(long minRevision,
boolean physical)
Perform a compaction.
|
KvClient.FluentDeleteRequest |
delete(com.google.protobuf.ByteString key)
Start a fluent delete request
|
com.google.common.util.concurrent.ListenableFuture<DeleteRangeResponse> |
delete(DeleteRangeRequest request) |
KvClient.FluentRangeRequest |
get(com.google.protobuf.ByteString key) |
com.google.common.util.concurrent.ListenableFuture<RangeResponse> |
get(RangeRequest request) |
KvClient.FluentPutRequest |
put(com.google.protobuf.ByteString key,
com.google.protobuf.ByteString value)
Put a key/value with no associated lease.
|
KvClient.FluentPutRequest |
put(com.google.protobuf.ByteString key,
com.google.protobuf.ByteString value,
long leaseId)
Put a key/value associated with a lease.
|
com.google.common.util.concurrent.ListenableFuture<PutResponse> |
put(PutRequest request) |
KvClient.FluentPutRequest |
setLease(com.google.protobuf.ByteString key,
long leaseId)
Associate an existing key/value with a lease.
|
KvClient.FluentPutRequest |
setValue(com.google.protobuf.ByteString key,
com.google.protobuf.ByteString value)
Put a key/value without affecting its lease association if
the key already exists.
|
com.google.common.util.concurrent.ListenableFuture<TxnResponse> |
txn(TxnRequest txn) |
KvClient.FluentTxnRequest |
txnIf()
Start a fluent transaction request
|
TxnResponse |
txnSync(TxnRequest txn,
long timeoutMillis) |
KvClient.FluentWatchRequest |
watch(com.google.protobuf.ByteString key)
Start a fluent watch request
|
KvClient.Watch |
watch(WatchCreateRequest request,
io.grpc.stub.StreamObserver<WatchUpdate> updates)
Watch watches on a key or prefix.
|
protected final GrpcClient client
public EtcdKvClient(GrpcClient client)
public com.google.common.util.concurrent.ListenableFuture<RangeResponse> get(RangeRequest request)
get in interface KvClientRangeResponsepublic KvClient.FluentRangeRequest get(com.google.protobuf.ByteString key)
get in interface KvClientkey - key to get or KvClient.ALL_KEYS for the entire keyspacepublic com.google.common.util.concurrent.ListenableFuture<TxnResponse> txn(TxnRequest txn)
txn in interface KvClientTxnResponsepublic KvClient.FluentTxnRequest txnIf()
KvClientpublic KvClient.FluentTxnOps<?> batch()
KvClientpublic TxnResponse txnSync(TxnRequest txn, long timeoutMillis)
txnSync in interface KvClientTxnResponsepublic com.google.common.util.concurrent.ListenableFuture<PutResponse> put(PutRequest request)
put in interface KvClientPutResponsepublic KvClient.FluentPutRequest put(com.google.protobuf.ByteString key, com.google.protobuf.ByteString value)
KvClientpublic KvClient.FluentPutRequest put(com.google.protobuf.ByteString key, com.google.protobuf.ByteString value, long leaseId)
KvClientpublic KvClient.FluentPutRequest setLease(com.google.protobuf.ByteString key, long leaseId)
KvClientpublic KvClient.FluentPutRequest setValue(com.google.protobuf.ByteString key, com.google.protobuf.ByteString value)
KvClientpublic com.google.common.util.concurrent.ListenableFuture<DeleteRangeResponse> delete(DeleteRangeRequest request)
delete in interface KvClientDeleteRangeResponsepublic KvClient.FluentDeleteRequest delete(com.google.protobuf.ByteString key)
KvClientdelete in interface KvClientkey - key to delete or KvClient.ALL_KEYS to delete everythingpublic void close()
public KvClient.Watch watch(WatchCreateRequest request, io.grpc.stub.StreamObserver<WatchUpdate> updates)
KvClientRevisionCompactedException.public KvClient.FluentWatchRequest watch(com.google.protobuf.ByteString key)
KvClientwatch in interface KvClientkey - key to watch or KvClient.ALL_KEYS to watch the entire keyspaceKvClient.watch(WatchCreateRequest, StreamObserver)public com.google.common.util.concurrent.ListenableFuture<CompactionResponse> compact(long minRevision, boolean physical)
KvClientcompact in interface KvClientminRevision - the lowest revision to retain in the kv store historyphysical - if true the request will not return until the compaction is
physically applied to the local database such that compacted entries are
totally removed from the backend databaseCopyright © 2023. All rights reserved.