public interface LockClient
| Modifier and Type | Interface and Description |
|---|---|
static interface |
LockClient.FluentLockRequest |
static interface |
LockClient.FluentUnlockRequest |
| Modifier and Type | Method and Description |
|---|---|
LockClient.FluentLockRequest |
lock(com.google.protobuf.ByteString name)
Acquire a lock with the given name.
|
LockClient.FluentUnlockRequest |
unlock(com.google.protobuf.ByteString key)
Release the lock with the given key.
|
LockClient.FluentLockRequest lock(com.google.protobuf.ByteString name)
withLease()
methods is used, the lock will be tied to this client's session lease.
The response contains a key whose existence is tied to the caller's ownership of the lock. 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 associated with the owner expires.
name - unique name identifying the lockLockClient.FluentUnlockRequest unlock(com.google.protobuf.ByteString key)
key - unique key returned in the LockResponse
from the lock(ByteString) method.Copyright © 2022. All rights reserved.