public interface KvClient
| Modifier and Type | Interface and Description |
|---|---|
static interface |
KvClient.FluentCmpTarget |
static interface |
KvClient.FluentDeleteRequest |
static interface |
KvClient.FluentPutRequest |
static interface |
KvClient.FluentRangeRequest |
static interface |
KvClient.FluentRequest<FR extends KvClient.FluentRequest<FR,ReqT,RespT>,ReqT,RespT>
Needed for backwards binary compatibility
|
static interface |
KvClient.FluentTxnOps<FTO extends KvClient.FluentTxnOps<FTO>> |
static interface |
KvClient.FluentTxnRequest |
static interface |
KvClient.FluentTxnSuccOps |
static interface |
KvClient.FluentWatchRequest |
static class |
KvClient.RetryStrategy |
static interface |
KvClient.Watch
Call
KvClient.Watch.close() at any time to cancel the watch. |
static interface |
KvClient.WatchIterator
Call
KvClient.WatchIterator.close() at any time to cancel the watch. |
| Modifier and Type | Field and Description |
|---|---|
static com.google.protobuf.ByteString |
ALL_KEYS
Used to get, watch or delete all of the keys (use with caution!)
|
| Modifier and Type | Method and Description |
|---|---|
KvClient.FluentTxnOps<?> |
batch()
Start a fluent batch transaction request
|
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.
|
static final com.google.protobuf.ByteString ALL_KEYS
com.google.common.util.concurrent.ListenableFuture<RangeResponse> get(RangeRequest request)
request - RangeResponseKvClient.FluentRangeRequest get(com.google.protobuf.ByteString key)
key - key to get or ALL_KEYS for the entire keyspacecom.google.common.util.concurrent.ListenableFuture<TxnResponse> txn(TxnRequest txn)
txn - TxnResponseTxnResponse txnSync(TxnRequest txn, long timeoutMillis)
txn - timeoutMillis - TxnResponseKvClient.FluentTxnRequest txnIf()
KvClient.FluentTxnOps<?> batch()
com.google.common.util.concurrent.ListenableFuture<PutResponse> put(PutRequest request)
request - PutResponseKvClient.FluentPutRequest put(com.google.protobuf.ByteString key, com.google.protobuf.ByteString value)
key - value - KvClient.FluentPutRequest put(com.google.protobuf.ByteString key, com.google.protobuf.ByteString value, long leaseId)
key - value - leaseId - KvClient.FluentPutRequest setLease(com.google.protobuf.ByteString key, long leaseId)
key - leaseId - KvClient.FluentPutRequest setValue(com.google.protobuf.ByteString key, com.google.protobuf.ByteString value)
key - value - com.google.common.util.concurrent.ListenableFuture<DeleteRangeResponse> delete(DeleteRangeRequest request)
request - DeleteRangeResponseKvClient.FluentDeleteRequest delete(com.google.protobuf.ByteString key)
key - key to delete or ALL_KEYS to delete everythingKvClient.Watch watch(WatchCreateRequest request, io.grpc.stub.StreamObserver<WatchUpdate> updates)
RevisionCompactedException.request - the watch optionupdates - watch update streamKvClient.FluentWatchRequest watch(com.google.protobuf.ByteString key)
key - key to watch or ALL_KEYS to watch the entire keyspacewatch(WatchCreateRequest, StreamObserver)com.google.common.util.concurrent.ListenableFuture<CompactionResponse> compact(long minRevision, boolean physical)
minRevision - 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 © 2022. All rights reserved.