Class LeaderKey


  • public class LeaderKey
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      LeaderKey​(com.google.protobuf.ByteString name, com.google.protobuf.ByteString key, long revision, long lease)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.protobuf.ByteString getKey()
      Returns the opaque key representing the ownership of the election.
      long getLease()
      Returns the lease ID of the election leader.
      com.google.protobuf.ByteString getName()
      Returns the election identifier that corresponds to the leadership key.
      long getRevision()
      Returns the creation revision of the key.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LeaderKey

        public LeaderKey​(com.google.protobuf.ByteString name,
                         com.google.protobuf.ByteString key,
                         long revision,
                         long lease)
    • Method Detail

      • getName

        public com.google.protobuf.ByteString getName()
        Returns the election identifier that corresponds to the leadership key. *
      • getKey

        public com.google.protobuf.ByteString getKey()
        Returns the opaque key representing the ownership of the election. If the key is deleted, then leadership is lost.
      • getRevision

        public long getRevision()
        Returns 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.
      • getLease

        public long getLease()
        Returns the lease ID of the election leader.