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