Class NodeStake.Builder

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

public static final class NodeStake.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<NodeStake,NodeStake.Builder> implements NodeStakeOrBuilder
 *
 Staking information for one node at the end of a staking period.

 This SHALL be one entry in a list reported at the end of each
 full staking period.
 
Protobuf type proto.NodeStake
  • Field Summary

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

    instance
  • Method Summary

    Modifier and Type
    Method
    Description
    * A limit to the amount of stake considered for consensus weight.
    * A minimum amount of HBAR staked to a node to receive rewards.
    * A node identifier.<br/> This value uniquely identifies this node within the network address book.
    * The rate of rewards, in tinybar per HBAR, for the staking reward period that just ended.
    * A consensus weight assigned to this node for the next staking period.
    * The total amount staked to this node, while declining rewards.
    * The total amount staked to this node, while accepting rewards.
    long
    * A limit to the amount of stake considered for consensus weight.
    long
    * A minimum amount of HBAR staked to a node to receive rewards.
    long
    * A node identifier.<br/> This value uniquely identifies this node within the network address book.
    long
    * The rate of rewards, in tinybar per HBAR, for the staking reward period that just ended.
    long
    * A consensus weight assigned to this node for the next staking period.
    long
    * The total amount staked to this node, while declining rewards.
    long
    * The total amount staked to this node, while accepting rewards.
    setMaxStake(long value)
    * A limit to the amount of stake considered for consensus weight.
    setMinStake(long value)
    * A minimum amount of HBAR staked to a node to receive rewards.
    setNodeId(long value)
    * A node identifier.<br/> This value uniquely identifies this node within the network address book.
    setRewardRate(long value)
    * The rate of rewards, in tinybar per HBAR, for the staking reward period that just ended.
    setStake(long value)
    * A consensus weight assigned to this node for the next staking period.
    setStakeNotRewarded(long value)
    * The total amount staked to this node, while declining rewards.
    setStakeRewarded(long value)
    * The total amount staked to this node, while accepting rewards.

    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

    • getMaxStake

      public long getMaxStake()
       *
       A limit to the amount of stake considered for consensus weight.
       <p>
       The amount of stake (whether accepting rewards or not) assigned to a
       node that exceeds this limit SHALL NOT be considered for
       consensus weight calculation.<br/>
       If stake to _reward_ for a node exceeds this threshold, then all
       accounts staking to that node SHALL receive a lower reward rate in
       proportion to the excess stake.
       
      int64 max_stake = 1;
      Specified by:
      getMaxStake in interface NodeStakeOrBuilder
      Returns:
      The maxStake.
    • setMaxStake

      public NodeStake.Builder setMaxStake(long value)
       *
       A limit to the amount of stake considered for consensus weight.
       <p>
       The amount of stake (whether accepting rewards or not) assigned to a
       node that exceeds this limit SHALL NOT be considered for
       consensus weight calculation.<br/>
       If stake to _reward_ for a node exceeds this threshold, then all
       accounts staking to that node SHALL receive a lower reward rate in
       proportion to the excess stake.
       
      int64 max_stake = 1;
      Parameters:
      value - The maxStake to set.
      Returns:
      This builder for chaining.
    • clearMaxStake

      public NodeStake.Builder clearMaxStake()
       *
       A limit to the amount of stake considered for consensus weight.
       <p>
       The amount of stake (whether accepting rewards or not) assigned to a
       node that exceeds this limit SHALL NOT be considered for
       consensus weight calculation.<br/>
       If stake to _reward_ for a node exceeds this threshold, then all
       accounts staking to that node SHALL receive a lower reward rate in
       proportion to the excess stake.
       
      int64 max_stake = 1;
      Returns:
      This builder for chaining.
    • getMinStake

      public long getMinStake()
       *
       A minimum amount of HBAR staked to a node to receive rewards.
       <p>
       If the amount of stake (whether accepting rewards or not) assigned to
       a node at the start of a staking period is less than this threshold,
       then no rewards SHALL be paid to that node or to any accounts
       staking to that node.
       
      int64 min_stake = 2;
      Specified by:
      getMinStake in interface NodeStakeOrBuilder
      Returns:
      The minStake.
    • setMinStake

      public NodeStake.Builder setMinStake(long value)
       *
       A minimum amount of HBAR staked to a node to receive rewards.
       <p>
       If the amount of stake (whether accepting rewards or not) assigned to
       a node at the start of a staking period is less than this threshold,
       then no rewards SHALL be paid to that node or to any accounts
       staking to that node.
       
      int64 min_stake = 2;
      Parameters:
      value - The minStake to set.
      Returns:
      This builder for chaining.
    • clearMinStake

      public NodeStake.Builder clearMinStake()
       *
       A minimum amount of HBAR staked to a node to receive rewards.
       <p>
       If the amount of stake (whether accepting rewards or not) assigned to
       a node at the start of a staking period is less than this threshold,
       then no rewards SHALL be paid to that node or to any accounts
       staking to that node.
       
      int64 min_stake = 2;
      Returns:
      This builder for chaining.
    • getNodeId

      public long getNodeId()
       *
       A node identifier.<br/>
       This value uniquely identifies this node within the
       network address book.
       
      int64 node_id = 3;
      Specified by:
      getNodeId in interface NodeStakeOrBuilder
      Returns:
      The nodeId.
    • setNodeId

      public NodeStake.Builder setNodeId(long value)
       *
       A node identifier.<br/>
       This value uniquely identifies this node within the
       network address book.
       
      int64 node_id = 3;
      Parameters:
      value - The nodeId to set.
      Returns:
      This builder for chaining.
    • clearNodeId

      public NodeStake.Builder clearNodeId()
       *
       A node identifier.<br/>
       This value uniquely identifies this node within the
       network address book.
       
      int64 node_id = 3;
      Returns:
      This builder for chaining.
    • getRewardRate

      public long getRewardRate()
       *
       The rate of rewards, in tinybar per HBAR, for the staking reward
       period that just ended.
       
      int64 reward_rate = 4;
      Specified by:
      getRewardRate in interface NodeStakeOrBuilder
      Returns:
      The rewardRate.
    • setRewardRate

      public NodeStake.Builder setRewardRate(long value)
       *
       The rate of rewards, in tinybar per HBAR, for the staking reward
       period that just ended.
       
      int64 reward_rate = 4;
      Parameters:
      value - The rewardRate to set.
      Returns:
      This builder for chaining.
    • clearRewardRate

      public NodeStake.Builder clearRewardRate()
       *
       The rate of rewards, in tinybar per HBAR, for the staking reward
       period that just ended.
       
      int64 reward_rate = 4;
      Returns:
      This builder for chaining.
    • getStake

      public long getStake()
       *
       A consensus weight assigned to this node for the next staking period.
       
      int64 stake = 5;
      Specified by:
      getStake in interface NodeStakeOrBuilder
      Returns:
      The stake.
    • setStake

      public NodeStake.Builder setStake(long value)
       *
       A consensus weight assigned to this node for the next staking period.
       
      int64 stake = 5;
      Parameters:
      value - The stake to set.
      Returns:
      This builder for chaining.
    • clearStake

      public NodeStake.Builder clearStake()
       *
       A consensus weight assigned to this node for the next staking period.
       
      int64 stake = 5;
      Returns:
      This builder for chaining.
    • getStakeNotRewarded

      public long getStakeNotRewarded()
       *
       The total amount staked to this node, while declining rewards.
       <p>
       This SHALL be the total staked amount, in tinybar, that is staked to
       this node with the value of the `decline_reward` set.<br/>
       This value MUST be calculated at the beginning of the staking period.
       
      int64 stake_not_rewarded = 6;
      Specified by:
      getStakeNotRewarded in interface NodeStakeOrBuilder
      Returns:
      The stakeNotRewarded.
    • setStakeNotRewarded

      public NodeStake.Builder setStakeNotRewarded(long value)
       *
       The total amount staked to this node, while declining rewards.
       <p>
       This SHALL be the total staked amount, in tinybar, that is staked to
       this node with the value of the `decline_reward` set.<br/>
       This value MUST be calculated at the beginning of the staking period.
       
      int64 stake_not_rewarded = 6;
      Parameters:
      value - The stakeNotRewarded to set.
      Returns:
      This builder for chaining.
    • clearStakeNotRewarded

      public NodeStake.Builder clearStakeNotRewarded()
       *
       The total amount staked to this node, while declining rewards.
       <p>
       This SHALL be the total staked amount, in tinybar, that is staked to
       this node with the value of the `decline_reward` set.<br/>
       This value MUST be calculated at the beginning of the staking period.
       
      int64 stake_not_rewarded = 6;
      Returns:
      This builder for chaining.
    • getStakeRewarded

      public long getStakeRewarded()
       *
       The total amount staked to this node, while accepting rewards.
       <p>
       This SHALL be the total staked amount, in tinybar, that is staked to
       this node with the value of the `decline_reward` not set.<br/>
       This value MUST be calculated at the beginning of the staking period.
       
      int64 stake_rewarded = 7;
      Specified by:
      getStakeRewarded in interface NodeStakeOrBuilder
      Returns:
      The stakeRewarded.
    • setStakeRewarded

      public NodeStake.Builder setStakeRewarded(long value)
       *
       The total amount staked to this node, while accepting rewards.
       <p>
       This SHALL be the total staked amount, in tinybar, that is staked to
       this node with the value of the `decline_reward` not set.<br/>
       This value MUST be calculated at the beginning of the staking period.
       
      int64 stake_rewarded = 7;
      Parameters:
      value - The stakeRewarded to set.
      Returns:
      This builder for chaining.
    • clearStakeRewarded

      public NodeStake.Builder clearStakeRewarded()
       *
       The total amount staked to this node, while accepting rewards.
       <p>
       This SHALL be the total staked amount, in tinybar, that is staked to
       this node with the value of the `decline_reward` not set.<br/>
       This value MUST be calculated at the beginning of the staking period.
       
      int64 stake_rewarded = 7;
      Returns:
      This builder for chaining.