public interface Lock
| Modifier and Type | Field and Description |
|---|---|
static String |
LEADER_ELECTION_RECORD_ANNOTATION_KEY |
| Modifier and Type | Method and Description |
|---|---|
void |
create(KubernetesClient client,
LeaderElectionRecord leaderElectionRecord)
Attempt to create a new
LeaderElectionRecord. |
String |
describe()
Full description of the current lock.
|
LeaderElectionRecord |
get(KubernetesClient client)
Returns the current
LeaderElectionRecord or null if none. |
String |
identity()
Returns the unique id of the lock holder.
|
void |
update(KubernetesClient client,
LeaderElectionRecord leaderElectionRecord)
Attempts to update the current
LeaderElectionRecord. |
static final String LEADER_ELECTION_RECORD_ANNOTATION_KEY
LeaderElectionRecord get(KubernetesClient client)
LeaderElectionRecord or null if none.client - used to retrieve the LeaderElectionRecordvoid create(KubernetesClient client, LeaderElectionRecord leaderElectionRecord) throws LockException
LeaderElectionRecord.client - used to retrieve the LeaderElectionRecordleaderElectionRecord - to updateLockException - if update was not possiblevoid update(KubernetesClient client, LeaderElectionRecord leaderElectionRecord) throws LockException
LeaderElectionRecord.client - used to retrieve the LeaderElectionRecordleaderElectionRecord - to updateLockException - if update was not possibleString identity()
LeaderElectionRecord.getHolderIdentity()
to check for leadership.String describe()
Copyright © 2015–2023 Red Hat. All rights reserved.