Class RosterState.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<RosterState,RosterState.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<RosterState,RosterState.Builder>
com.hedera.hashgraph.sdk.proto.RosterState.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, RosterStateOrBuilder, Cloneable
Enclosing class:
RosterState

public static final class RosterState.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<RosterState,RosterState.Builder> implements RosterStateOrBuilder
 *
 The current state of platform rosters.<br/>
 This message stores a roster data for the platform in network state.

 The roster state SHALL encapsulate the incoming candidate roster's hash,
 and a list of pairs of round number and active roster hash.<br/>
 This data SHALL be used to track round numbers and the rosters used in determining the consensus.<br/>
 
Protobuf type com.hedera.hapi.node.state.roster.RosterState
  • Field Summary

    Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder

    instance
  • Method Summary

    Modifier and Type
    Method
    Description
    * A list of round numbers and roster hashes.<br/> The round number indicates the round in which the corresponding roster became active <p> This list SHALL be ordered by round numbers in descending order.
    * A list of round numbers and roster hashes.<br/> The round number indicates the round in which the corresponding roster became active <p> This list SHALL be ordered by round numbers in descending order.
    addRoundRosterPairs(int index, RoundRosterPair.Builder builderForValue)
    * A list of round numbers and roster hashes.<br/> The round number indicates the round in which the corresponding roster became active <p> This list SHALL be ordered by round numbers in descending order.
    * A list of round numbers and roster hashes.<br/> The round number indicates the round in which the corresponding roster became active <p> This list SHALL be ordered by round numbers in descending order.
    * A list of round numbers and roster hashes.<br/> The round number indicates the round in which the corresponding roster became active <p> This list SHALL be ordered by round numbers in descending order.
    * The SHA-384 hash of a candidate roster.
    * A list of round numbers and roster hashes.<br/> The round number indicates the round in which the corresponding roster became active <p> This list SHALL be ordered by round numbers in descending order.
    * Indicates whether the roster transplant is in progress.<br/> This is needed to determine if all the node creations and deletions are complete.
    com.google.protobuf.ByteString
    * The SHA-384 hash of a candidate roster.
    * A list of round numbers and roster hashes.<br/> The round number indicates the round in which the corresponding roster became active <p> This list SHALL be ordered by round numbers in descending order.
    int
    * A list of round numbers and roster hashes.<br/> The round number indicates the round in which the corresponding roster became active <p> This list SHALL be ordered by round numbers in descending order.
    * A list of round numbers and roster hashes.<br/> The round number indicates the round in which the corresponding roster became active <p> This list SHALL be ordered by round numbers in descending order.
    boolean
    * Indicates whether the roster transplant is in progress.<br/> This is needed to determine if all the node creations and deletions are complete.
    * A list of round numbers and roster hashes.<br/> The round number indicates the round in which the corresponding roster became active <p> This list SHALL be ordered by round numbers in descending order.
    setCandidateRosterHash(com.google.protobuf.ByteString value)
    * The SHA-384 hash of a candidate roster.
    * A list of round numbers and roster hashes.<br/> The round number indicates the round in which the corresponding roster became active <p> This list SHALL be ordered by round numbers in descending order.
    setRoundRosterPairs(int index, RoundRosterPair.Builder builderForValue)
    * A list of round numbers and roster hashes.<br/> The round number indicates the round in which the corresponding roster became active <p> This list SHALL be ordered by round numbers in descending order.
    setTransplantInProgress(boolean value)
    * Indicates whether the roster transplant is in progress.<br/> This is needed to determine if all the node creations and deletions are complete.

    Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder

    build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    getDefaultInstanceForType, isInitialized
  • Method Details

    • getCandidateRosterHash

      public com.google.protobuf.ByteString getCandidateRosterHash()
       *
       The SHA-384 hash of a candidate roster.
       <p>
       This is the hash of the roster that is currently being considered
       for adoption.<br/>
       A Node SHALL NOT, ever, have more than one candidate roster
       at the same time.
       
      bytes candidate_roster_hash = 1;
      Specified by:
      getCandidateRosterHash in interface RosterStateOrBuilder
      Returns:
      The candidateRosterHash.
    • setCandidateRosterHash

      public RosterState.Builder setCandidateRosterHash(com.google.protobuf.ByteString value)
       *
       The SHA-384 hash of a candidate roster.
       <p>
       This is the hash of the roster that is currently being considered
       for adoption.<br/>
       A Node SHALL NOT, ever, have more than one candidate roster
       at the same time.
       
      bytes candidate_roster_hash = 1;
      Parameters:
      value - The candidateRosterHash to set.
      Returns:
      This builder for chaining.
    • clearCandidateRosterHash

      public RosterState.Builder clearCandidateRosterHash()
       *
       The SHA-384 hash of a candidate roster.
       <p>
       This is the hash of the roster that is currently being considered
       for adoption.<br/>
       A Node SHALL NOT, ever, have more than one candidate roster
       at the same time.
       
      bytes candidate_roster_hash = 1;
      Returns:
      This builder for chaining.
    • getRoundRosterPairsList

      public List<RoundRosterPair> getRoundRosterPairsList()
       *
       A list of round numbers and roster hashes.<br/>
       The round number indicates the round in which the corresponding roster became active
       <p>
       This list SHALL be ordered by round numbers in descending order.
       
      repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2;
      Specified by:
      getRoundRosterPairsList in interface RosterStateOrBuilder
    • getRoundRosterPairsCount

      public int getRoundRosterPairsCount()
       *
       A list of round numbers and roster hashes.<br/>
       The round number indicates the round in which the corresponding roster became active
       <p>
       This list SHALL be ordered by round numbers in descending order.
       
      repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2;
      Specified by:
      getRoundRosterPairsCount in interface RosterStateOrBuilder
    • getRoundRosterPairs

      public RoundRosterPair getRoundRosterPairs(int index)
       *
       A list of round numbers and roster hashes.<br/>
       The round number indicates the round in which the corresponding roster became active
       <p>
       This list SHALL be ordered by round numbers in descending order.
       
      repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2;
      Specified by:
      getRoundRosterPairs in interface RosterStateOrBuilder
    • setRoundRosterPairs

      public RosterState.Builder setRoundRosterPairs(int index, RoundRosterPair value)
       *
       A list of round numbers and roster hashes.<br/>
       The round number indicates the round in which the corresponding roster became active
       <p>
       This list SHALL be ordered by round numbers in descending order.
       
      repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2;
    • setRoundRosterPairs

      public RosterState.Builder setRoundRosterPairs(int index, RoundRosterPair.Builder builderForValue)
       *
       A list of round numbers and roster hashes.<br/>
       The round number indicates the round in which the corresponding roster became active
       <p>
       This list SHALL be ordered by round numbers in descending order.
       
      repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2;
    • addRoundRosterPairs

      public RosterState.Builder addRoundRosterPairs(RoundRosterPair value)
       *
       A list of round numbers and roster hashes.<br/>
       The round number indicates the round in which the corresponding roster became active
       <p>
       This list SHALL be ordered by round numbers in descending order.
       
      repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2;
    • addRoundRosterPairs

      public RosterState.Builder addRoundRosterPairs(int index, RoundRosterPair value)
       *
       A list of round numbers and roster hashes.<br/>
       The round number indicates the round in which the corresponding roster became active
       <p>
       This list SHALL be ordered by round numbers in descending order.
       
      repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2;
    • addRoundRosterPairs

      public RosterState.Builder addRoundRosterPairs(RoundRosterPair.Builder builderForValue)
       *
       A list of round numbers and roster hashes.<br/>
       The round number indicates the round in which the corresponding roster became active
       <p>
       This list SHALL be ordered by round numbers in descending order.
       
      repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2;
    • addRoundRosterPairs

      public RosterState.Builder addRoundRosterPairs(int index, RoundRosterPair.Builder builderForValue)
       *
       A list of round numbers and roster hashes.<br/>
       The round number indicates the round in which the corresponding roster became active
       <p>
       This list SHALL be ordered by round numbers in descending order.
       
      repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2;
    • addAllRoundRosterPairs

      public RosterState.Builder addAllRoundRosterPairs(Iterable<? extends RoundRosterPair> values)
       *
       A list of round numbers and roster hashes.<br/>
       The round number indicates the round in which the corresponding roster became active
       <p>
       This list SHALL be ordered by round numbers in descending order.
       
      repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2;
    • clearRoundRosterPairs

      public RosterState.Builder clearRoundRosterPairs()
       *
       A list of round numbers and roster hashes.<br/>
       The round number indicates the round in which the corresponding roster became active
       <p>
       This list SHALL be ordered by round numbers in descending order.
       
      repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2;
    • removeRoundRosterPairs

      public RosterState.Builder removeRoundRosterPairs(int index)
       *
       A list of round numbers and roster hashes.<br/>
       The round number indicates the round in which the corresponding roster became active
       <p>
       This list SHALL be ordered by round numbers in descending order.
       
      repeated .com.hedera.hapi.node.state.roster.RoundRosterPair round_roster_pairs = 2;
    • getTransplantInProgress

      public boolean getTransplantInProgress()
       *
       Indicates whether the roster transplant is in progress.<br/>
       This is needed to determine if all the node creations and deletions are complete.
       True while a transplant roster is still being processed (nodes are
       being created/updated/deleted).  Reset to false once dispatch is finished.
      
       <p>
       A transplant roster is one that has been adopted from another network
       using an override startup asset, rather than being generated by the current network's consensus.
       
      bool transplant_in_progress = 3;
      Specified by:
      getTransplantInProgress in interface RosterStateOrBuilder
      Returns:
      The transplantInProgress.
    • setTransplantInProgress

      public RosterState.Builder setTransplantInProgress(boolean value)
       *
       Indicates whether the roster transplant is in progress.<br/>
       This is needed to determine if all the node creations and deletions are complete.
       True while a transplant roster is still being processed (nodes are
       being created/updated/deleted).  Reset to false once dispatch is finished.
      
       <p>
       A transplant roster is one that has been adopted from another network
       using an override startup asset, rather than being generated by the current network's consensus.
       
      bool transplant_in_progress = 3;
      Parameters:
      value - The transplantInProgress to set.
      Returns:
      This builder for chaining.
    • clearTransplantInProgress

      public RosterState.Builder clearTransplantInProgress()
       *
       Indicates whether the roster transplant is in progress.<br/>
       This is needed to determine if all the node creations and deletions are complete.
       True while a transplant roster is still being processed (nodes are
       being created/updated/deleted).  Reset to false once dispatch is finished.
      
       <p>
       A transplant roster is one that has been adopted from another network
       using an override startup asset, rather than being generated by the current network's consensus.
       
      bool transplant_in_progress = 3;
      Returns:
      This builder for chaining.