• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Authpb
    • AuthReflection
    • Permission
    • Permission.Types
    • Permission.Types.Type
    • Role
    • User
  • ETCD.V3
    • AuthCallInvoker
    • AuthExtensions
    • Client
    • ClusterExtensions
    • Constants
    • KVExtensions
    • LeaseExtensions
    • MaintenanceExtensions
    • WatchExtensions
  • Etcdserverpb
    • AlarmMember
    • AlarmRequest
    • AlarmRequest.Types
    • AlarmRequest.Types.AlarmAction
    • AlarmResponse
    • AlarmType
    • Auth
    • Auth.AuthBase
    • Auth.AuthClient
    • AuthDisableRequest
    • AuthDisableResponse
    • AuthEnableRequest
    • AuthEnableResponse
    • AuthenticateRequest
    • AuthenticateResponse
    • AuthRoleAddRequest
    • AuthRoleAddResponse
    • AuthRoleDeleteRequest
    • AuthRoleDeleteResponse
    • AuthRoleGetRequest
    • AuthRoleGetResponse
    • AuthRoleGrantPermissionRequest
    • AuthRoleGrantPermissionResponse
    • AuthRoleListRequest
    • AuthRoleListResponse
    • AuthRoleRevokePermissionRequest
    • AuthRoleRevokePermissionResponse
    • AuthUserAddRequest
    • AuthUserAddResponse
    • AuthUserChangePasswordRequest
    • AuthUserChangePasswordResponse
    • AuthUserDeleteRequest
    • AuthUserDeleteResponse
    • AuthUserGetRequest
    • AuthUserGetResponse
    • AuthUserGrantRoleRequest
    • AuthUserGrantRoleResponse
    • AuthUserListRequest
    • AuthUserListResponse
    • AuthUserRevokeRoleRequest
    • AuthUserRevokeRoleResponse
    • Cluster
    • Cluster.ClusterBase
    • Cluster.ClusterClient
    • CompactionRequest
    • CompactionResponse
    • Compare
    • Compare.TargetUnionOneofCase
    • Compare.Types
    • Compare.Types.CompareResult
    • Compare.Types.CompareTarget
    • DefragmentRequest
    • DefragmentResponse
    • DeleteRangeRequest
    • DeleteRangeResponse
    • HashRequest
    • HashResponse
    • KV
    • KV.KVBase
    • KV.KVClient
    • Lease
    • Lease.LeaseBase
    • Lease.LeaseClient
    • LeaseGrantRequest
    • LeaseGrantResponse
    • LeaseKeepAliveRequest
    • LeaseKeepAliveResponse
    • LeaseRevokeRequest
    • LeaseRevokeResponse
    • LeaseTimeToLiveRequest
    • LeaseTimeToLiveResponse
    • Maintenance
    • Maintenance.MaintenanceBase
    • Maintenance.MaintenanceClient
    • Member
    • MemberAddRequest
    • MemberAddResponse
    • MemberListRequest
    • MemberListResponse
    • MemberRemoveRequest
    • MemberRemoveResponse
    • MemberUpdateRequest
    • MemberUpdateResponse
    • PutRequest
    • PutResponse
    • RangeRequest
    • RangeRequest.Types
    • RangeRequest.Types.SortOrder
    • RangeRequest.Types.SortTarget
    • RangeResponse
    • RequestOp
    • RequestOp.RequestOneofCase
    • ResponseHeader
    • ResponseOp
    • ResponseOp.ResponseOneofCase
    • RpcReflection
    • SnapshotRequest
    • SnapshotResponse
    • StatusRequest
    • StatusResponse
    • TxnRequest
    • TxnResponse
    • Watch
    • Watch.WatchBase
    • Watch.WatchClient
    • WatchCancelRequest
    • WatchCreateRequest
    • WatchCreateRequest.Types
    • WatchCreateRequest.Types.FilterType
    • WatchRequest
    • WatchRequest.RequestUnionOneofCase
    • WatchResponse
  • Mvccpb
    • Event
    • Event.Types
    • Event.Types.EventType
    • KeyValue
    • KvReflection

Class LeaseExtensions

Inheritance
System.Object
LeaseExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: ETCD.V3
Assembly: cs.temp.dll.dll
Syntax
public static class LeaseExtensions

Methods

CreateLeaseGrantRequest(Client, Int64, Int64)

Create LeaseGrantRequest.

Declaration
public static LeaseGrantRequest CreateLeaseGrantRequest(this Client client, long ttl, long id)
Parameters
Type Name Description
Client client
System.Int64 ttl

TTL is the advisory time-to-live in seconds.

System.Int64 id

ID is the requested ID for the lease. If ID is set to 0, the lessor chooses an ID.

Returns
Type Description
LeaseGrantRequest

LeaseGrantRequest.

CreateLeaseRevokeRequest(Client, Int64)

Create LeaseRevokeRequest.

Declaration
public static LeaseRevokeRequest CreateLeaseRevokeRequest(this Client client, long id)
Parameters
Type Name Description
Client client
System.Int64 id

ID is the lease ID to revoke. When the ID is revoked, all associated keys will be deleted.

Returns
Type Description
LeaseRevokeRequest

The response received from the server.

CreateLeaseTimeToLiveRequest(Client, Int64, Boolean)

Create LeaseTimeToLiveRequest.

Declaration
public static LeaseTimeToLiveRequest CreateLeaseTimeToLiveRequest(this Client client, long id, bool keys = false)
Parameters
Type Name Description
Client client
System.Int64 id

ID is the lease ID for the lease.

System.Boolean keys

keys is true to query all the keys attached to this lease.

Returns
Type Description
LeaseTimeToLiveRequest

LeaseTimeToLiveRequest.

LeaseGrant(Client, Int64, Int64)

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 static LeaseGrantResponse LeaseGrant(this Client client, long ttl, long id)
Parameters
Type Name Description
Client client
System.Int64 ttl

TTL is the advisory time-to-live in seconds.

System.Int64 id

ID is the requested ID for the lease. If ID is set to 0, the lessor chooses an ID.

Returns
Type Description
LeaseGrantResponse

The response received from the server.

LeaseGrantAsync(Client, Int64, Int64)

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 static AsyncUnaryCall<LeaseGrantResponse> LeaseGrantAsync(this Client client, long ttl, long id)
Parameters
Type Name Description
Client client
System.Int64 ttl

TTL is the advisory time-to-live in seconds.

System.Int64 id

ID is the requested ID for the lease. If ID is set to 0, the lessor chooses an ID.

Returns
Type Description
AsyncUnaryCall<LeaseGrantResponse>

The call object.

LeaseKeepAlive(Client)

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 static AsyncDuplexStreamingCall<LeaseKeepAliveRequest, LeaseKeepAliveResponse> LeaseKeepAlive(this Client client)
Parameters
Type Name Description
Client client
Returns
Type Description
AsyncDuplexStreamingCall<LeaseKeepAliveRequest, LeaseKeepAliveResponse>

The call object.

LeaseRevoke(Client, Int64)

LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.

Declaration
public static LeaseRevokeResponse LeaseRevoke(this Client client, long id)
Parameters
Type Name Description
Client client
System.Int64 id

ID is the lease ID to revoke. When the ID is revoked, all associated keys will be deleted.

Returns
Type Description
LeaseRevokeResponse

The response received from the server.

LeaseRevokeAsync(Client, Int64)

LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.

Declaration
public static AsyncUnaryCall<LeaseRevokeResponse> LeaseRevokeAsync(this Client client, long id)
Parameters
Type Name Description
Client client
System.Int64 id

ID is the lease ID to revoke. When the ID is revoked, all associated keys will be deleted.

Returns
Type Description
AsyncUnaryCall<LeaseRevokeResponse>

The call object.

LeaseTimeToLive(Client, Int64, Boolean)

LeaseTimeToLive retrieves lease information.

Declaration
public static LeaseTimeToLiveResponse LeaseTimeToLive(this Client client, long id, bool keys = false)
Parameters
Type Name Description
Client client
System.Int64 id

ID is the lease ID for the lease.

System.Boolean keys

keys is true to query all the keys attached to this lease.

Returns
Type Description
LeaseTimeToLiveResponse

The response received from the server.

LeaseTimeToLiveAsync(Client, Int64, Boolean)

LeaseTimeToLive retrieves lease information.

Declaration
public static AsyncUnaryCall<LeaseTimeToLiveResponse> LeaseTimeToLiveAsync(this Client client, long id, bool keys = false)
Parameters
Type Name Description
Client client
System.Int64 id

ID is the lease ID for the lease.

System.Boolean keys

keys is true to query all the keys attached to this lease.

Returns
Type Description
AsyncUnaryCall<LeaseTimeToLiveResponse>

The call object.

Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX