Class ThrottleBucket

java.lang.Object
com.google.protobuf.AbstractMessageLite<ThrottleBucket,ThrottleBucket.Builder>
com.google.protobuf.GeneratedMessageLite<ThrottleBucket,ThrottleBucket.Builder>
com.hedera.hashgraph.sdk.proto.ThrottleBucket
All Implemented Interfaces:
com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, ThrottleBucketOrBuilder

@Generated public final class ThrottleBucket extends com.google.protobuf.GeneratedMessageLite<ThrottleBucket,ThrottleBucket.Builder> implements ThrottleBucketOrBuilder
 *
 A "bucket" of performance allocated across one or more throttle groups.<br/>
 This entry combines one or more throttle groups into a single unit to
 calculate limitations and congestion. Each "bucket" "fills" as operations
 are completed, then "drains" over a period of time defined for each bucket.
 This fill-and-drain characteristic enables the network to process sudden
 bursts of heavy traffic while still observing throttle limits over longer
 timeframes.

 The value of `burstPeriodMs` is combined with the `milliOpsPerSec`
 values for the individual throttle groups to determine the total
 bucket "capacity". This combination MUST be less than the maximum
 value of a signed long integer (`9223372036854775807`), when scaled to
 a nanosecond measurement resolution.

 > Note
 >> There is some question regarding the mechanism of calculating the
 >> combination of `burstPeriodMs` and `milliOpsPerSec`. The calculation
 >> Is implemented in difficult-to-find code, and very likely does not
 >> match the approach described here.
 
Protobuf type proto.ThrottleBucket
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    * A "bucket" of performance allocated across one or more throttle groups.<br/> This entry combines one or more throttle groups into a single unit to calculate limitations and congestion.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite

    com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite,Type>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessageLite

    unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final Object
    dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
     
    long
    * A burst duration limit, in milliseconds.<br/> This value determines the total "capacity" of the bucket.
     
    boolean
    * If set to true, this bucket is used for high-volume throttles.
    * A name for this bucket.<br/> This is used for log entries.
    com.google.protobuf.ByteString
    * A name for this bucket.<br/> This is used for log entries.
    getThrottleGroups(int index)
    * A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket.
    int
    * A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket.
    * A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket.
    * A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket.
    * A list of throttle groups.<br/> These throttle groups combined define the effective throttle rate for the bucket.
     
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<ThrottleBucket>
     

    Methods inherited from class com.google.protobuf.GeneratedMessageLite

    createBuilder, createBuilder, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeTo

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    getDefaultInstanceForType, isInitialized
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • BURSTPERIODMS_FIELD_NUMBER

      public static final int BURSTPERIODMS_FIELD_NUMBER
      See Also:
    • THROTTLEGROUPS_FIELD_NUMBER

      public static final int THROTTLEGROUPS_FIELD_NUMBER
      See Also:
    • HIGH_VOLUME_FIELD_NUMBER

      public static final int HIGH_VOLUME_FIELD_NUMBER
      See Also:
  • Method Details

    • getName

      public String getName()
       *
       A name for this bucket.<br/>
       This is used for log entries.
       <p>
       This value SHOULD NOT exceed 20 characters.
       
      string name = 1;
      Specified by:
      getName in interface ThrottleBucketOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       *
       A name for this bucket.<br/>
       This is used for log entries.
       <p>
       This value SHOULD NOT exceed 20 characters.
       
      string name = 1;
      Specified by:
      getNameBytes in interface ThrottleBucketOrBuilder
      Returns:
      The bytes for name.
    • getBurstPeriodMs

      public long getBurstPeriodMs()
       *
       A burst duration limit, in milliseconds.<br/>
       This value determines the total "capacity" of the bucket. The rate
       at which the bucket "drains" is set by the throttles, and this duration
       sets how long that rate must be sustained to empty a "full" bucket.
       That combination (calculated as the product of this value and the least
       common multiple of the `milliOpsPerSec` values for all throttle groups)
       determines the maximum amount of operations this bucket can "hold".
       <p>
       The calculated capacity of this bucket MUST NOT exceed `9,223,372,036,854`.
       
      uint64 burstPeriodMs = 2;
      Specified by:
      getBurstPeriodMs in interface ThrottleBucketOrBuilder
      Returns:
      The burstPeriodMs.
    • getThrottleGroupsList

      public List<ThrottleGroup> getThrottleGroupsList()
       *
       A list of throttle groups.<br/>
       These throttle groups combined define the effective throttle
       rate for the bucket.
       <p>
       This list MUST contain at least one entry.
       
      repeated .proto.ThrottleGroup throttleGroups = 3;
      Specified by:
      getThrottleGroupsList in interface ThrottleBucketOrBuilder
    • getThrottleGroupsOrBuilderList

      public List<? extends ThrottleGroupOrBuilder> getThrottleGroupsOrBuilderList()
       *
       A list of throttle groups.<br/>
       These throttle groups combined define the effective throttle
       rate for the bucket.
       <p>
       This list MUST contain at least one entry.
       
      repeated .proto.ThrottleGroup throttleGroups = 3;
    • getThrottleGroupsCount

      public int getThrottleGroupsCount()
       *
       A list of throttle groups.<br/>
       These throttle groups combined define the effective throttle
       rate for the bucket.
       <p>
       This list MUST contain at least one entry.
       
      repeated .proto.ThrottleGroup throttleGroups = 3;
      Specified by:
      getThrottleGroupsCount in interface ThrottleBucketOrBuilder
    • getThrottleGroups

      public ThrottleGroup getThrottleGroups(int index)
       *
       A list of throttle groups.<br/>
       These throttle groups combined define the effective throttle
       rate for the bucket.
       <p>
       This list MUST contain at least one entry.
       
      repeated .proto.ThrottleGroup throttleGroups = 3;
      Specified by:
      getThrottleGroups in interface ThrottleBucketOrBuilder
    • getThrottleGroupsOrBuilder

      public ThrottleGroupOrBuilder getThrottleGroupsOrBuilder(int index)
       *
       A list of throttle groups.<br/>
       These throttle groups combined define the effective throttle
       rate for the bucket.
       <p>
       This list MUST contain at least one entry.
       
      repeated .proto.ThrottleGroup throttleGroups = 3;
    • getHighVolume

      public boolean getHighVolume()
       *
       If set to true, this bucket is used for high-volume throttles.
       
      bool high_volume = 4;
      Specified by:
      getHighVolume in interface ThrottleBucketOrBuilder
      Returns:
      The highVolume.
    • parseFrom

      public static ThrottleBucket parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ThrottleBucket parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ThrottleBucket parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ThrottleBucket parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ThrottleBucket parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ThrottleBucket parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ThrottleBucket parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ThrottleBucket parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ThrottleBucket parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ThrottleBucket parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ThrottleBucket parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ThrottleBucket parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilder

      public static ThrottleBucket.Builder newBuilder()
    • newBuilder

      public static ThrottleBucket.Builder newBuilder(ThrottleBucket prototype)
    • dynamicMethod

      protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
      Specified by:
      dynamicMethod in class com.google.protobuf.GeneratedMessageLite<ThrottleBucket,ThrottleBucket.Builder>
    • getDefaultInstance

      public static ThrottleBucket getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<ThrottleBucket> parser()