Package io.etcd.jetcd.api
Interface LeaderKeyOrBuilder
-
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
LeaderKey,LeaderKey.Builder
public interface LeaderKeyOrBuilder extends com.google.protobuf.MessageOrBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.google.protobuf.ByteStringgetKey()key is an opaque key representing the ownership of the election.longgetLease()lease is the lease ID of the election leader.com.google.protobuf.ByteStringgetName()name is the election identifier that correponds to the leadership key.longgetRev()rev is the creation revision of the key.-
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
-
-
-
Method Detail
-
getName
com.google.protobuf.ByteString getName()
name is the election identifier that correponds to the leadership key.
bytes name = 1;- Returns:
- The name.
-
getKey
com.google.protobuf.ByteString getKey()
key is an opaque key representing the ownership of the election. If the key is deleted, then leadership is lost.
bytes key = 2;- Returns:
- The key.
-
getRev
long getRev()
rev is the creation revision of the key. It can be used to test for ownership of an election during transactions by testing the key's creation revision matches rev.
int64 rev = 3;- Returns:
- The rev.
-
getLease
long getLease()
lease is the lease ID of the election leader.
int64 lease = 4;- Returns:
- The lease.
-
-