public class LeaseService extends LeaseGrpc.LeaseImplBase
| Constructor and Description |
|---|
LeaseService(KetaLeaderElector elector) |
| Modifier and Type | Method and Description |
|---|---|
void |
leaseGrant(LeaseGrantRequest request,
io.grpc.stub.StreamObserver<LeaseGrantResponse> responseObserver)
LeaseGrant creates a lease which expires if the server does not receive a keepAlive
within a given time to live period.
|
io.grpc.stub.StreamObserver<LeaseKeepAliveRequest> |
leaseKeepAlive(io.grpc.stub.StreamObserver<LeaseKeepAliveResponse> responseObserver)
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.
|
void |
leaseLeases(LeaseLeasesRequest request,
io.grpc.stub.StreamObserver<LeaseLeasesResponse> responseObserver)
LeaseLeases lists all existing leases.
|
void |
leaseRevoke(LeaseRevokeRequest request,
io.grpc.stub.StreamObserver<LeaseRevokeResponse> responseObserver)
LeaseRevoke revokes a lease.
|
void |
leaseTimeToLive(LeaseTimeToLiveRequest request,
io.grpc.stub.StreamObserver<LeaseTimeToLiveResponse> responseObserver)
LeaseTimeToLive retrieves lease information.
|
bindServicepublic LeaseService(KetaLeaderElector elector)
public void leaseGrant(LeaseGrantRequest request, io.grpc.stub.StreamObserver<LeaseGrantResponse> responseObserver)
LeaseGrpc.LeaseImplBaseLeaseGrant 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.
leaseGrant in class LeaseGrpc.LeaseImplBasepublic void leaseRevoke(LeaseRevokeRequest request, io.grpc.stub.StreamObserver<LeaseRevokeResponse> responseObserver)
LeaseGrpc.LeaseImplBaseLeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.
leaseRevoke in class LeaseGrpc.LeaseImplBasepublic io.grpc.stub.StreamObserver<LeaseKeepAliveRequest> leaseKeepAlive(io.grpc.stub.StreamObserver<LeaseKeepAliveResponse> responseObserver)
LeaseGrpc.LeaseImplBaseLeaseKeepAlive 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.
leaseKeepAlive in class LeaseGrpc.LeaseImplBasepublic void leaseTimeToLive(LeaseTimeToLiveRequest request, io.grpc.stub.StreamObserver<LeaseTimeToLiveResponse> responseObserver)
LeaseGrpc.LeaseImplBaseLeaseTimeToLive retrieves lease information.
leaseTimeToLive in class LeaseGrpc.LeaseImplBasepublic void leaseLeases(LeaseLeasesRequest request, io.grpc.stub.StreamObserver<LeaseLeasesResponse> responseObserver)
LeaseGrpc.LeaseImplBaseLeaseLeases lists all existing leases.
leaseLeases in class LeaseGrpc.LeaseImplBaseCopyright © 2021. All rights reserved.