LEADER_ELECTION_RECORD_ANNOTATION_KEY| Constructor and Description |
|---|
ConfigMapLock(String configMapNamespace,
String configMapName,
String identity) |
| 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. |
public LeaderElectionRecord get(KubernetesClient client)
LeaderElectionRecord or null if none.public void create(KubernetesClient client, LeaderElectionRecord leaderElectionRecord) throws LockException
LeaderElectionRecord.create in interface Lockclient - used to retrieve the LeaderElectionRecordleaderElectionRecord - to updateLockException - if update was not possiblepublic void update(KubernetesClient client, LeaderElectionRecord leaderElectionRecord) throws LockException
LeaderElectionRecord.update in interface Lockclient - used to retrieve the LeaderElectionRecordleaderElectionRecord - to updateLockException - if update was not possiblepublic String identity()
LeaderElectionRecord.getHolderIdentity()
to check for leadership.Copyright © 2015–2022 Red Hat. All rights reserved.