io.etcd.jetcd.api.lock

## Class LockGrpc.LockImplBase

- java.lang.Object
- - io.etcd.jetcd.api.lock.LockGrpc.LockImplBase

All Implemented Interfaces:
  io.grpc.BindableService

Enclosing class:
  LockGrpc

    public abstract static class LockGrpc.LockImplBase
    extends Object
    implements io.grpc.BindableService

     The lock service exposes client-side locking facilities as a gRPC interface.

### Constructor Summary

Constructors
Constructor and Description
`LockImplBase()`

### Method Summary

All Methods Instance Methods Concrete Methods
`io.grpc.ServerServiceDefinition` `bindService()`
`void` `lock(LockRequest request, io.grpc.stub.StreamObserver<LockResponse> responseObserver)` Lock acquires a distributed shared lock on a given named lock.
`void` `unlock(UnlockRequest request, io.grpc.stub.StreamObserver<UnlockResponse> responseObserver)` Unlock takes a key returned by Lock and releases the hold on lock.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### LockImplBase

    public LockImplBase()

### Method Detail

#### lock

    public void lock(LockRequest request,
                     io.grpc.stub.StreamObserver<LockResponse> responseObserver)

     Lock acquires a distributed shared lock on a given named lock.
     On success, it will return a unique key that exists so long as the
     lock is held by the caller. This key can be used in conjunction with
     transactions to safely ensure updates to etcd only occur while holding
     lock ownership. The lock is held until Unlock is called on the key or the
     lease associate with the owner expires.

#### unlock

    public void unlock(UnlockRequest request,
                       io.grpc.stub.StreamObserver<UnlockResponse> responseObserver)

     Unlock takes a key returned by Lock and releases the hold on lock. The
     next Lock caller waiting for the lock will then be woken up and given
     ownership of the lock.

#### bindService

    public final io.grpc.ServerServiceDefinition bindService()

Specified by:
  `bindService` in interface `io.grpc.BindableService`