Class KV.KVBase
Base class for server-side implementations of KV
Inheritance
Inherited Members
Namespace: Etcdserverpb
Assembly: cs.temp.dll.dll
Syntax
public abstract class KVBase
Methods
Compact(CompactionRequest, grpc.ServerCallContext)
Compact compacts the event history in the etcd key-value store. The key-value store should be periodically compacted or the event history will continue to grow indefinitely.
Declaration
public virtual Task<CompactionResponse> Compact(CompactionRequest request, grpc.ServerCallContext context)
Parameters
Type | Name | Description |
---|---|---|
CompactionRequest | request | The request received from the client. |
grpc.ServerCallContext | context | The context of the server-side call handler being invoked. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<CompactionResponse> | The response to send back to the client (wrapped by a task). |
DeleteRange(DeleteRangeRequest, grpc.ServerCallContext)
DeleteRange deletes the given range from the key-value store. A delete request increments the revision of the key-value store and generates a delete event in the event history for every deleted key.
Declaration
public virtual Task<DeleteRangeResponse> DeleteRange(DeleteRangeRequest request, grpc.ServerCallContext context)
Parameters
Type | Name | Description |
---|---|---|
DeleteRangeRequest | request | The request received from the client. |
grpc.ServerCallContext | context | The context of the server-side call handler being invoked. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DeleteRangeResponse> | The response to send back to the client (wrapped by a task). |
Put(PutRequest, grpc.ServerCallContext)
Put puts the given key into the key-value store. A put request increments the revision of the key-value store and generates one event in the event history.
Declaration
public virtual Task<PutResponse> Put(PutRequest request, grpc.ServerCallContext context)
Parameters
Type | Name | Description |
---|---|---|
PutRequest | request | The request received from the client. |
grpc.ServerCallContext | context | The context of the server-side call handler being invoked. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<PutResponse> | The response to send back to the client (wrapped by a task). |
Range(RangeRequest, grpc.ServerCallContext)
Range gets the keys in the range from the key-value store.
Declaration
public virtual Task<RangeResponse> Range(RangeRequest request, grpc.ServerCallContext context)
Parameters
Type | Name | Description |
---|---|---|
RangeRequest | request | The request received from the client. |
grpc.ServerCallContext | context | The context of the server-side call handler being invoked. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<RangeResponse> | The response to send back to the client (wrapped by a task). |
Txn(TxnRequest, grpc.ServerCallContext)
Txn processes multiple requests in a single transaction. A txn request increments the revision of the key-value store and generates events with the same revision for every completed request. It is not allowed to modify the same key several times within one txn.
Declaration
public virtual Task<TxnResponse> Txn(TxnRequest request, grpc.ServerCallContext context)
Parameters
Type | Name | Description |
---|---|---|
TxnRequest | request | The request received from the client. |
grpc.ServerCallContext | context | The context of the server-side call handler being invoked. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TxnResponse> | The response to send back to the client (wrapped by a task). |