Class Lease.LeaseBase
Base class for server-side implementations of Lease
Inheritance
Inherited Members
Namespace: Etcdserverpb
Assembly: cs.temp.dll.dll
Syntax
public abstract class LeaseBase
Methods
LeaseGrant(LeaseGrantRequest, grpc.ServerCallContext)
LeaseGrant creates a lease which expires if the server does not receive a keepAlive within a given time to live period. All keys attached to the lease will be expired and deleted if the lease expires. Each expired key generates a delete event in the event history.
Declaration
public virtual Task<LeaseGrantResponse> LeaseGrant(LeaseGrantRequest request, grpc.ServerCallContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| LeaseGrantRequest | 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<LeaseGrantResponse> | The response to send back to the client (wrapped by a task). |
LeaseKeepAlive(grpc.IAsyncStreamReader<LeaseKeepAliveRequest>, grpc.IServerStreamWriter<LeaseKeepAliveResponse>, grpc.ServerCallContext)
LeaseKeepAlive keeps the lease alive by streaming keep alive requests from the client to the server and streaming keep alive responses from the server to the client.
Declaration
public virtual Task LeaseKeepAlive(grpc.IAsyncStreamReader<LeaseKeepAliveRequest> requestStream, grpc.IServerStreamWriter<LeaseKeepAliveResponse> responseStream, grpc.ServerCallContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| grpc.IAsyncStreamReader<LeaseKeepAliveRequest> | requestStream | Used for reading requests from the client. |
| grpc.IServerStreamWriter<LeaseKeepAliveResponse> | responseStream | Used for sending responses back to the client. |
| grpc.ServerCallContext | context | The context of the server-side call handler being invoked. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | A task indicating completion of the handler. |
LeaseRevoke(LeaseRevokeRequest, grpc.ServerCallContext)
LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.
Declaration
public virtual Task<LeaseRevokeResponse> LeaseRevoke(LeaseRevokeRequest request, grpc.ServerCallContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| LeaseRevokeRequest | 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<LeaseRevokeResponse> | The response to send back to the client (wrapped by a task). |
LeaseTimeToLive(LeaseTimeToLiveRequest, grpc.ServerCallContext)
LeaseTimeToLive retrieves lease information.
Declaration
public virtual Task<LeaseTimeToLiveResponse> LeaseTimeToLive(LeaseTimeToLiveRequest request, grpc.ServerCallContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| LeaseTimeToLiveRequest | 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<LeaseTimeToLiveResponse> | The response to send back to the client (wrapped by a task). |